You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
238 B
15 lines
238 B
10 months ago
|
#pragma once
|
||
|
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
#include "likely.h"
|
||
|
#include "panic.h"
|
||
|
|
||
|
static inline void *
|
||
|
xmalloc(size_t size)
|
||
|
{
|
||
|
void *allocation = malloc(size);
|
||
|
if (unlikely(allocation == NULL)) panic("xmalloc failed!\n");
|
||
|
return allocation;
|
||
|
}
|