1/*
2 * Copyright 2010-2012 Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef MALLOC_DEBUG_H
6#define MALLOC_DEBUG_H
7
8
9#include <OS.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15status_t heap_debug_start_wall_checking(int msInterval);
16status_t heap_debug_stop_wall_checking();
17
18void heap_debug_set_memory_reuse(bool enabled);
19void heap_debug_set_paranoid_validation(bool enabled);
20void heap_debug_set_debugger_calls(bool enabled);
21void heap_debug_set_default_alignment(size_t defaultAlignment);
22void heap_debug_validate_heaps();
23void heap_debug_validate_walls();
24
25void heap_debug_dump_allocations(bool statsOnly, thread_id thread);
26void heap_debug_dump_heaps(bool dumpAreas, bool dumpBins);
27
28void *heap_debug_malloc_with_guard_page(size_t size);
29
30status_t heap_debug_get_allocation_info(void *address, size_t *size,
31	thread_id *thread);
32
33status_t heap_debug_dump_allocations_on_exit(bool enabled);
34status_t heap_debug_set_stack_trace_depth(size_t stackTraceDepth);
35
36#ifdef __cplusplus
37}
38#endif
39
40#endif /* MALLOC_DEBUG_H */
41