diff options
author | Dan Albert <danalbert@google.com> | 2014-06-14 01:04:31 +0000 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2014-06-14 01:04:31 +0000 |
commit | e5fdaa4f9d102461a4d8a865e6ca84666893b9e7 (patch) | |
tree | c17c2b67e2f12161e67f9b337c9cdc11bd8eab5f /tests/string_test.cpp | |
parent | a04d2bc28e7d7fcaf34ad71e4a6608a13cf84197 (diff) | |
download | android_bionic-e5fdaa4f9d102461a4d8a865e6ca84666893b9e7.tar.gz android_bionic-e5fdaa4f9d102461a4d8a865e6ca84666893b9e7.tar.bz2 android_bionic-e5fdaa4f9d102461a4d8a865e6ca84666893b9e7.zip |
Revert "Backing this one out since the counterpart needs to be sent upstream."
This reverts commit a04d2bc28e7d7fcaf34ad71e4a6608a13cf84197.
Change-Id: I1b49165ca5d4bafdba7948818256a6167a363aca
Diffstat (limited to 'tests/string_test.cpp')
-rw-r--r-- | tests/string_test.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/string_test.cpp b/tests/string_test.cpp index a468b97fc..2ab60d771 100644 --- a/tests/string_test.cpp +++ b/tests/string_test.cpp @@ -17,6 +17,7 @@ #include <gtest/gtest.h> #include <errno.h> +#include <malloc.h> #include <math.h> #include <string.h> @@ -143,9 +144,9 @@ struct StringTestState { int max_alignment = 64; // TODO: fix the tests to not sometimes use twice their specified "MAX_LEN". - glob_ptr = reinterpret_cast<Character*>(valloc(2 * sizeof(Character) * MAX_LEN + max_alignment)); - glob_ptr1 = reinterpret_cast<Character*>(valloc(2 * sizeof(Character) * MAX_LEN + max_alignment)); - glob_ptr2 = reinterpret_cast<Character*>(valloc(2 * sizeof(Character) * MAX_LEN + max_alignment)); + glob_ptr = reinterpret_cast<Character*>(memalign(sysconf(_SC_PAGESIZE), 2 * sizeof(Character) * MAX_LEN + max_alignment)); + glob_ptr1 = reinterpret_cast<Character*>(memalign(sysconf(_SC_PAGESIZE), 2 * sizeof(Character) * MAX_LEN + max_alignment)); + glob_ptr2 = reinterpret_cast<Character*>(memalign(sysconf(_SC_PAGESIZE), 2 * sizeof(Character) * MAX_LEN + max_alignment)); InitLenArray(); |