summaryrefslogtreecommitdiff
path: root/runtime/lambda/leaking_allocator.cc
diff options
context:
space:
mode:
author Igor Murashkin <iam@google.com> 2015-10-06 13:59:43 -0700
committer Igor Murashkin <iam@google.com> 2015-11-02 14:14:49 -0800
commit30c475a2046951a81769c2db0b2dad66cd71e189 (patch)
treef3d87ecc26335ef7e3500430c6c2ac93a8fa4317 /runtime/lambda/leaking_allocator.cc
parent8c812b71552a8a1b2bf06e430d355b12b7084807 (diff)
lambda: Minor capture-variable/liberate-variable clean-up after post-merge reviews.
Change-Id: I64f867d4ed5a5efcac138097f38efe4bb7f1281d
Diffstat (limited to 'runtime/lambda/leaking_allocator.cc')
-rw-r--r--runtime/lambda/leaking_allocator.cc7
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