com32/include/alloc.h

24 lines
427 B
C

#ifndef ALLOC
#define ALLOC
#include <stdint.h>
#include <string.h>
typedef struct malloc_entry {
void* ptr;
uint32_t size;
#define MALLOC_USED 1
#define MALLOC_FREE 0
uint8_t state;
} __attribute__((packed)) malloc_entry;
void init_hashtable();
void* malloc(uint32_t size);
void free(void* ptr);
void* realloc(void* ptr, uint32_t size);
/*
extern void* malloc_base_pointer;
extern unsigned int highest_size;
*/
#endif