kernel: Move the debug heap to a separate file in the debug directory.

This commit is contained in:
Augustin Cavalier
2026-03-23 23:01:26 -04:00
parent e9c8f1a9e1
commit 4fd16356e0
5 changed files with 2463 additions and 2473 deletions
+2 -25
View File
@@ -45,20 +45,6 @@
#define HEAP_PRIORITY_VIP 0x04
typedef struct heap_class_s {
const char *name;
uint32 initial_percentage;
size_t max_allocation_size;
size_t page_size;
size_t min_bin_size;
size_t bin_alignment;
uint32 min_count_per_page;
size_t max_waste_per_page;
} heap_class;
typedef struct heap_allocator_s heap_allocator;
#ifdef __cplusplus
extern "C" {
#endif
@@ -72,22 +58,13 @@ void* memalign(size_t alignment, size_t size) _ALIGNED_BY_ARG(1);
void deferred_free(void* block);
void heap_add_area(heap_allocator* heap, area_id areaID, addr_t base,
size_t size);
heap_allocator* heap_create_allocator(const char* name, addr_t base,
size_t size, const heap_class* heapClass, bool allocateOnHeap);
void* heap_memalign(heap_allocator* heap, size_t alignment, size_t size) _ALIGNED_BY_ARG(2);
status_t heap_free(heap_allocator* heap, void* address);
#if KERNEL_HEAP_LEAK_CHECK
void heap_set_get_caller(heap_allocator* heap, addr_t (*getCaller)());
#endif
status_t heap_init(addr_t heapBase, size_t heapSize);
status_t heap_init_post_area();
status_t heap_init_post_sem();
status_t heap_init_post_thread();
void deferred_free_init();
#ifdef __cplusplus
}
#endif