[ASan] Fix large allocator test case to cope with 64k pages

Summary: My PowerPC64 Linux box has 64k pages. The test assumes 4k pages. Fix it.

Reviewers: glider, eugenis, samsonov

Reviewed By: samsonov

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6228

llvm-svn: 221875
This commit is contained in:
Jay Foad 2014-11-13 09:15:15 +00:00
parent 998912453d
commit 347a2b7cd4
1 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@
#include <string.h>
#include <sys/mman.h>
#include <stdlib.h>
#include <unistd.h>
#ifdef __ANDROID__
#include <malloc.h>
@ -23,7 +24,7 @@ void *my_memalign(size_t boundary, size_t size) {
#endif
int main() {
const int kPageSize = 4096;
const long kPageSize = sysconf(_SC_PAGESIZE);
void *p = my_memalign(kPageSize, 1024 * 1024);
free(p);