diff options
Diffstat (limited to 'runtime/linear_alloc.cc')
-rw-r--r-- | runtime/linear_alloc.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/runtime/linear_alloc.cc b/runtime/linear_alloc.cc index fe6bee6d02..43e81d9d94 100644 --- a/runtime/linear_alloc.cc +++ b/runtime/linear_alloc.cc @@ -23,6 +23,11 @@ namespace art { LinearAlloc::LinearAlloc(ArenaPool* pool) : lock_("linear alloc"), allocator_(pool) { } +void* LinearAlloc::Realloc(Thread* self, void* ptr, size_t old_size, size_t new_size) { + MutexLock mu(self, lock_); + return allocator_.Realloc(ptr, old_size, new_size); +} + void* LinearAlloc::Alloc(Thread* self, size_t size) { MutexLock mu(self, lock_); return allocator_.Alloc(size); @@ -33,4 +38,14 @@ size_t LinearAlloc::GetUsedMemory() const { return allocator_.BytesUsed(); } +ArenaPool* LinearAlloc::GetArenaPool() { + MutexLock mu(Thread::Current(), lock_); + return allocator_.GetArenaPool(); +} + +bool LinearAlloc::Contains(void* ptr) const { + MutexLock mu(Thread::Current(), lock_); + return allocator_.Contains(ptr); +} + } // namespace art |