kernel: Move the debug heap to a separate file in the debug directory.
This commit is contained in:
@@ -45,20 +45,6 @@
|
|||||||
#define HEAP_PRIORITY_VIP 0x04
|
#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
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@@ -72,22 +58,13 @@ void* memalign(size_t alignment, size_t size) _ALIGNED_BY_ARG(1);
|
|||||||
|
|
||||||
void deferred_free(void* block);
|
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(addr_t heapBase, size_t heapSize);
|
||||||
status_t heap_init_post_area();
|
status_t heap_init_post_area();
|
||||||
status_t heap_init_post_sem();
|
status_t heap_init_post_sem();
|
||||||
status_t heap_init_post_thread();
|
status_t heap_init_post_thread();
|
||||||
|
|
||||||
|
void deferred_free_init();
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ KernelMergeObject kernel_debug.o :
|
|||||||
frame_buffer_console.cpp
|
frame_buffer_console.cpp
|
||||||
gdb.cpp
|
gdb.cpp
|
||||||
guarded_heap.cpp
|
guarded_heap.cpp
|
||||||
|
heap.cpp
|
||||||
safemode_settings.cpp
|
safemode_settings.cpp
|
||||||
system_profiler.cpp
|
system_profiler.cpp
|
||||||
tracing.cpp
|
tracing.cpp
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
+24
-2448
File diff suppressed because it is too large
Load Diff
@@ -4020,6 +4020,7 @@ vm_init_post_thread(kernel_args* args)
|
|||||||
{
|
{
|
||||||
vm_page_init_post_thread(args);
|
vm_page_init_post_thread(args);
|
||||||
slab_init_post_thread();
|
slab_init_post_thread();
|
||||||
|
deferred_free_init();
|
||||||
return heap_init_post_thread();
|
return heap_init_post_thread();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user