Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef _MEM_H_
- #define _MEM_H_
- #include <stddef.h>
- #include <stdint.h>
- #include <sys/mman.h>
- #include <stdbool.h>
- #define HEAP_START ((void*)0x04040000)
- #pragma pack(push, 1)
- typedef struct mem {
- struct mem* next;
- size_t capacity;
- bool is_free;
- } mem;
- #pragma pack(pop)
- void* _malloc(size_t);
- void _free(void*);
- void *merge_chunk(mem *, mem *);
- void mem_init(mem *, size_t);
- void *heap_init(size_t);
- size_t page_align(size_t);
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement