Home
last modified time | relevance | path

Searched refs:last_alloc_ (Results 1 – 4 of 4) sorted by relevance

/external/libtextclassifier/native/utils/base/
Darena.cc123 last_alloc_(nullptr), in BaseArena()
214 last_alloc_ = nullptr; in Reset()
399 last_alloc_ = freestart_; in AllocNewBlock()
403 ASAN_UNPOISON_MEMORY_REGION(last_alloc_, size); in AllocNewBlock()
405 return reinterpret_cast<void*>(last_alloc_); in AllocNewBlock()
452 if (last_alloc == nullptr || last_alloc != last_alloc_) return false; in AllocNewBlock()
454 assert(freestart_ >= last_alloc_ && freestart_ <= last_alloc_ + block_size_); in AllocNewBlock()
456 if (newsize > (freestart_ - last_alloc_) + remaining_) in AllocNewBlock()
459 freestart_ = last_alloc_ + newsize; // where last alloc ends now in AllocNewBlock()
463 ASAN_UNPOISON_MEMORY_REGION(last_alloc_, newsize); in AllocNewBlock()
Darena.h117 last_alloc_ = freestart_; in GetMemory()
121 ASAN_UNPOISON_MEMORY_REGION(last_alloc_, size); in GetMemory()
123 return reinterpret_cast<void*>(last_alloc_); in GetMemory()
130 if (memory == last_alloc_ && in ReturnMemory()
131 size == static_cast<size_t>(freestart_ - last_alloc_)) { in ReturnMemory()
133 freestart_ = last_alloc_; in ReturnMemory()
166 char* last_alloc_; // used to make sure ReturnBytes() is safe variable
/external/libcxx/test/support/
Dtest_allocator.h375 void* last_alloc_; member
377 limited_alloc_handle() : outstanding_(0), last_alloc_(nullptr) {} in limited_alloc_handle()
383 last_alloc_ = ::operator new(N*sizeof(T)); in allocate()
385 return static_cast<T*>(last_alloc_); in allocate()
389 if (ptr == last_alloc_) { in deallocate()
390 last_alloc_ = nullptr; in deallocate()
/external/cronet/buildtools/third_party/libc++/trunk/test/support/
Dtest_allocator.h354 void* last_alloc_ = nullptr; member
361 last_alloc_ = alloc; in allocate()
368 if (ptr == last_alloc_) { in deallocate()
369 last_alloc_ = nullptr; in deallocate()