diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-06-11 07:46:51 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-06-11 07:46:51 +0200 |
commit | 744ec3c18d6e312d1e2cc281915d251fca49ae55 (patch) | |
tree | 6c16a41a6f8da70da34753c8a7892c55813f5c28 /src/alloc.h | |
parent | d40fe3a6503586eb2ce93311cc4bf23febfbeb83 (diff) |
Add basic LLVM codegen
Diffstat (limited to 'src/alloc.h')
-rw-r--r-- | src/alloc.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/alloc.h b/src/alloc.h new file mode 100644 index 0000000..8e8b365 --- /dev/null +++ b/src/alloc.h @@ -0,0 +1,11 @@ +#ifndef ORYX_ALLOC_H +#define ORYX_ALLOC_H + +#include <stddef.h> + +/* Allocate a buffer of NMEMB elements of size SIZE. If PTR is non-null then + reallocate the buffer it points to. Aborts on out-of-memory or overflow. */ +void *bufalloc(void *ptr, size_t nmemb, size_t size) + __attribute__((returns_nonnull)); + +#endif /* !ORYX_ALLOC_H */ |