]>
git.proxmox.com Git - rustc.git/blob - src/libcompiler_builtins/compiler-rt/lib/lsan/lsan_allocator.h
1 //=-- lsan_allocator.h ----------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file is a part of LeakSanitizer.
11 // Allocator for standalone LSan.
13 //===----------------------------------------------------------------------===//
15 #ifndef LSAN_ALLOCATOR_H
16 #define LSAN_ALLOCATOR_H
18 #include "sanitizer_common/sanitizer_common.h"
19 #include "sanitizer_common/sanitizer_internal_defs.h"
23 void *Allocate(const StackTrace
&stack
, uptr size
, uptr alignment
,
25 void Deallocate(void *p
);
26 void *Reallocate(const StackTrace
&stack
, void *p
, uptr new_size
,
28 uptr
GetMallocUsableSize(const void *p
);
30 template<typename Callable
>
31 void ForEachChunk(const Callable
&callback
);
33 void GetAllocatorCacheRange(uptr
*begin
, uptr
*end
);
34 void AllocatorThreadFinish();
35 void InitializeAllocator();
39 #endif // LSAN_ALLOCATOR_H