core: Add xmalloc() implementation

Signed-off-by: Chloe M. <chloe@mirocom.org>
This commit is contained in:
2026-04-30 08:51:19 -04:00
parent d7b25b944b
commit 4da05d05c9
2 changed files with 42 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
/*
* Copyright (c) 2026, Chloe M.
* Provided under the BSD-3 clause
*/
#ifndef BLOBCHAIN_MEMLIB_H
#define BLOBCHAIN_MEMLIB_H 1
/*
* Allocate memory and exit upon failure
*
* @sz: Number of bytes to allocate
*
* Always returns on success
*/
void *xmalloc(size_t sz);
#endif /* !BLOBCHAIN_MEMLIB_H */