1 //=-- lsan_allocator.h ----------------------------------------------------===//
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
6 //===----------------------------------------------------------------------===//
8 // This file is a part of LeakSanitizer.
9 // Allocator for standalone LSan.
11 //===----------------------------------------------------------------------===//
13 #ifndef LSAN_ALLOCATOR_H
14 #define LSAN_ALLOCATOR_H
16 #include "sanitizer_common/sanitizer_common.h"
17 #include "sanitizer_common/sanitizer_internal_defs.h"
21 void *Allocate(const StackTrace
&stack
, uptr size
, uptr alignment
,
23 void Deallocate(void *p
);
24 void *Reallocate(const StackTrace
&stack
, void *p
, uptr new_size
,
26 uptr
GetMallocUsableSize(void *p
);
28 template<typename Callable
>
29 void ForEachChunk(const Callable
&callback
);
31 void GetAllocatorCacheRange(uptr
*begin
, uptr
*end
);
32 void AllocatorThreadFinish();
33 void InitializeAllocator();
37 #endif // LSAN_ALLOCATOR_H