diff options
author | 2015-11-03 21:15:50 +0000 | |
---|---|---|
committer | 2015-11-03 21:15:50 +0000 | |
commit | f33ea7911dadab2e49c4634cb1763f0526047e89 (patch) | |
tree | d80b0a7ac8d15a674f1ee2c2c842fce3b9205754 /runtime/lambda/leaking_allocator.cc | |
parent | 530dcc8b74a0f4e5f54e2b2c326580d58594a2f7 (diff) | |
parent | 30c475a2046951a81769c2db0b2dad66cd71e189 (diff) |
Merge "lambda: Minor capture-variable/liberate-variable clean-up after post-merge reviews."
Diffstat (limited to 'runtime/lambda/leaking_allocator.cc')
-rw-r--r-- | runtime/lambda/leaking_allocator.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/lambda/leaking_allocator.cc b/runtime/lambda/leaking_allocator.cc index 4910732a6c..22bb294d03 100644 --- a/runtime/lambda/leaking_allocator.cc +++ b/runtime/lambda/leaking_allocator.cc @@ -14,6 +14,7 @@ * limitations under the License. */ +#include "base/bit_utils.h" #include "lambda/leaking_allocator.h" #include "linear_alloc.h" #include "runtime.h" @@ -21,9 +22,11 @@ namespace art { namespace lambda { -void* LeakingAllocator::AllocateMemory(Thread* self, size_t byte_size) { +void* LeakingAllocator::AllocateMemoryImpl(Thread* self, size_t byte_size, size_t align_size) { // TODO: use GetAllocatorForClassLoader to allocate lambda ArtMethod data. - return Runtime::Current()->GetLinearAlloc()->Alloc(self, byte_size); + void* mem = Runtime::Current()->GetLinearAlloc()->Alloc(self, byte_size); + DCHECK_ALIGNED_PARAM(reinterpret_cast<uintptr_t>(mem), align_size); + return mem; } } // namespace lambda |