2016-09-05 21:47:26 +02:00
|
|
|
/**
|
2016-09-11 22:20:15 +02:00
|
|
|
* Author......: See docs/credits.txt
|
2016-09-05 21:47:26 +02:00
|
|
|
* License.....: MIT
|
|
|
|
*/
|
|
|
|
|
2023-01-30 15:41:12 +01:00
|
|
|
#ifndef HC_MEMORY_H
|
|
|
|
#define HC_MEMORY_H
|
2016-09-05 21:47:26 +02:00
|
|
|
|
2016-10-09 22:41:55 +02:00
|
|
|
#include <stdio.h>
|
2016-09-05 21:47:26 +02:00
|
|
|
#include <string.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#define MSG_ENOMEM "Insufficient memory available"
|
|
|
|
|
2016-11-20 22:54:52 +01:00
|
|
|
void *hccalloc (const size_t nmemb, const size_t sz);
|
|
|
|
void *hcmalloc (const size_t sz);
|
|
|
|
void *hcrealloc (void *ptr, const size_t oldsz, const size_t addsz);
|
|
|
|
char *hcstrdup (const char *s);
|
2016-10-10 11:03:11 +02:00
|
|
|
void hcfree (void *ptr);
|
2016-09-06 18:44:05 +02:00
|
|
|
|
2023-05-09 01:11:33 +02:00
|
|
|
void *hcmalloc_aligned (const size_t sz, const int align);
|
|
|
|
void hcfree_aligned (void *ptr);
|
|
|
|
|
2023-01-30 15:41:12 +01:00
|
|
|
#endif // HC_MEMORY_H
|