| Index: runtime/vm/os_android.cc
|
| diff --git a/runtime/vm/os_android.cc b/runtime/vm/os_android.cc
|
| index a33effe8d2cf6449111576eee79d49a8470ad2f7..c7bfcbcce6f185f1725687776eef9616b7109715 100644
|
| --- a/runtime/vm/os_android.cc
|
| +++ b/runtime/vm/os_android.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include <errno.h>
|
| #include <limits.h>
|
| +#include <malloc.h>
|
| #include <time.h>
|
| #include <sys/resource.h>
|
| #include <sys/time.h>
|
| @@ -67,6 +68,23 @@ int64_t OS::GetCurrentTimeMicros() {
|
| }
|
|
|
|
|
| +void* OS::AlignedAllocate(intptr_t size, intptr_t alignment) {
|
| + const int kMinimumAlignment = 16;
|
| + ASSERT(Utils::IsPowerOfTwo(alignment));
|
| + ASSERT(alignment >= kMinimumAlignment);
|
| + void* p = memalign(alignment, size);
|
| + if (p == NULL) {
|
| + UNREACHABLE();
|
| + }
|
| + return p;
|
| +}
|
| +
|
| +
|
| +void OS::AlignedFree(void* ptr) {
|
| + free(ptr);
|
| +}
|
| +
|
| +
|
| // TODO(5411554): May need to hoist these architecture dependent code
|
| // into a architecture specific file e.g: os_ia32_linux.cc
|
| word OS::ActivationFrameAlignment() {
|
|
|