mirror of
https://github.com/sigmasternchen/crap-libs
synced 2025-03-15 15:48:56 +00:00
16 lines
351 B
C
16 lines
351 B
C
#ifndef MEMORY_H
|
|
#define MEMORY_H
|
|
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
#define allocate_object(type) allocate(sizeof(type));
|
|
|
|
#define clone_string(s) clone((void*) s, strlen(s) + 1)
|
|
#define clone_obj(obj, class) clone((void*) obj, sizeof(class))
|
|
|
|
void* allocate(size_t);
|
|
void* reallocate(void*, size_t);
|
|
void* clone(const void*, size_t);
|
|
|
|
#endif
|