Lines Matching refs:allocator
12 // Implementation of ASan's memory allocator, 2-nd version.
13 // This variant uses the allocator from sanitizer_common, i.e. the one shared
78 SecondaryAllocator> Allocator;
89 static Allocator allocator;
97 // Every chunk of memory allocated by this allocator can be in one of 3 states:
135 // The memory chunk allocated from the underlying allocator looks like this:
186 return *reinterpret_cast<uptr *>(allocator.GetMetaData(AllocBeg()));
190 return allocator.GetBlockBegin(reinterpret_cast<void *>(this));
281 allocator.Deallocate(cache_, p);
285 return allocator.Allocate(cache_, size, 1, false);
289 allocator.Deallocate(cache_, p);
296 allocator.Init();
326 // If we are allocating from the secondary allocator, there will be no
343 allocated = allocator.Allocate(cache, needed_size, 8, false);
347 allocated = allocator.Allocate(cache, needed_size, 8, false);
378 CHECK(allocator.FromPrimary(allocated));
380 CHECK(!allocator.FromPrimary(allocated));
382 uptr *meta = reinterpret_cast<uptr *>(allocator.GetMetaData(allocated));
497 uptr alloc_beg = reinterpret_cast<uptr>(allocator.GetBlockBegin(ptr));
505 if (!allocator.FromPrimary(ptr)) {
507 allocator.GetMetaData(reinterpret_cast<void *>(alloc_beg)));
511 uptr actual_size = allocator.GetActuallyAllocatedSize(ptr);
581 allocator.SwallowCache(GetAllocatorCache(this));
585 allocator.PrintStats();
607 // If the memory comes from the secondary allocator no need to clear it
609 if (ptr && allocator.FromPrimary(ptr))
660 allocator.ForceLock();
666 allocator.ForceUnlock();
674 // ASan allocator doesn't reserve extra bytes, so normally we would