summaryrefslogtreecommitdiffstats
path: root/libdex
diff options
context:
space:
mode:
authorChris Dearman <chris@mips.com>2012-01-30 18:22:27 -0800
committerRaghu Gandham <raghu@mips.com>2012-01-30 18:22:36 -0800
commit356839bd278d7c7f2675b56755d4a2f0e4a5d88c (patch)
tree1013b94c1b327f95ba4497c7afdafc55fc3b83d0 /libdex
parenta669206dc91323e664a84b2a4ca170ec0332c926 (diff)
downloadandroid_dalvik-356839bd278d7c7f2675b56755d4a2f0e4a5d88c.tar.gz
android_dalvik-356839bd278d7c7f2675b56755d4a2f0e4a5d88c.tar.bz2
android_dalvik-356839bd278d7c7f2675b56755d4a2f0e4a5d88c.zip
Set SYSTEM_PAGE_SIZE from PAGE_SHIFT
Hardwiring the expected page size is not portable Signed-off-by: Chris Dearman <chris@mips.com>
Diffstat (limited to 'libdex')
-rw-r--r--libdex/SysUtil.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libdex/SysUtil.h b/libdex/SysUtil.h
index 100c31260..90a63ca2a 100644
--- a/libdex/SysUtil.h
+++ b/libdex/SysUtil.h
@@ -31,7 +31,11 @@
*
* Must be a power of 2.
*/
+#ifdef PAGE_SHIFT
+#define SYSTEM_PAGE_SIZE (1<<PAGE_SHIFT)
+#else
#define SYSTEM_PAGE_SIZE 4096
+#endif
/*
* Use this to keep track of mapped segments.