2018-10-16 09:01:38 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
void kmalloc_init();
|
2018-11-16 23:11:08 +00:00
|
|
|
void *kmalloc(dword size) __attribute__ ((malloc));
|
2018-10-31 22:19:15 +00:00
|
|
|
void* kmalloc_eternal(size_t) __attribute__ ((malloc));
|
2018-11-01 08:01:51 +00:00
|
|
|
void* kmalloc_page_aligned(size_t) __attribute__ ((malloc));
|
2018-10-16 09:01:38 +00:00
|
|
|
void kfree(void*);
|
|
|
|
|
2018-10-26 22:14:24 +00:00
|
|
|
bool is_kmalloc_address(void*);
|
|
|
|
|
2018-12-02 22:34:50 +00:00
|
|
|
extern volatile size_t sum_alloc;
|
|
|
|
extern volatile size_t sum_free;
|
|
|
|
extern volatile size_t kmalloc_sum_eternal;
|
|
|
|
extern volatile size_t kmalloc_sum_page_aligned;
|
2018-10-16 09:01:38 +00:00
|
|
|
|
|
|
|
inline void* operator new(size_t, void* p) { return p; }
|
|
|
|
inline void* operator new[](size_t, void* p) { return p; }
|