2010-02-08 04:27:21 +03:00
|
|
|
/*
|
2010-11-04 00:46:47 +03:00
|
|
|
* Copyright 2010 Haiku Inc. All Rights Reserved.
|
2010-02-08 04:27:21 +03:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef MALLOC_DEBUG_H
|
|
|
|
#define MALLOC_DEBUG_H
|
|
|
|
|
2010-11-04 00:46:47 +03:00
|
|
|
|
2010-02-15 23:28:15 +03:00
|
|
|
#include <OS.h>
|
|
|
|
|
2010-02-08 04:27:21 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2010-02-15 23:28:15 +03:00
|
|
|
status_t heap_debug_start_wall_checking(int msInterval);
|
|
|
|
status_t heap_debug_stop_wall_checking();
|
|
|
|
|
|
|
|
void heap_debug_set_memory_reuse(bool enabled);
|
|
|
|
void heap_debug_set_paranoid_validation(bool enabled);
|
2010-02-16 00:35:07 +03:00
|
|
|
void heap_debug_set_debugger_calls(bool enabled);
|
2010-02-15 23:28:15 +03:00
|
|
|
void heap_debug_validate_heaps();
|
|
|
|
void heap_debug_validate_walls();
|
2010-02-08 04:27:21 +03:00
|
|
|
|
2010-02-15 23:28:15 +03:00
|
|
|
void heap_debug_dump_allocations(bool statsOnly, thread_id thread);
|
|
|
|
void heap_debug_dump_heaps(bool dumpAreas, bool dumpBins);
|
2010-02-08 04:27:21 +03:00
|
|
|
|
2010-02-15 23:28:15 +03:00
|
|
|
void *heap_debug_malloc_with_guard_page(size_t size);
|
2010-02-08 04:27:21 +03:00
|
|
|
|
2010-02-15 23:57:52 +03:00
|
|
|
status_t heap_debug_get_allocation_info(void *address, size_t *size,
|
|
|
|
thread_id *thread);
|
|
|
|
|
2010-02-08 04:27:21 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* MALLOC_DEBUG_H */
|