Skip to contentSkip to conversation

memory in mips with 32bit ELF is lower than 0x80000000

PATCH New Shang Yanfeng 1 participant 1 message Jan 4, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 memory in mips with 32bit ELF is lower than 0x80000000

because userspace memory in mips with 32bit ELF is lower than 0x80000000, so mmap failed.

---
 testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c +7 -2
index 45cddf7..1e59f1d 100644
@@ -64,8 +64,13 @@
 #include "usctest.h"
 #include "system_specific_hugepages_info.h"
 
-#define LOW_ADDR       (void *)(0x80000000)
-#define LOW_ADDR2      (void *)(0x90000000)
+#if defined(__mips__) && __WORDSIZE == 32
+#define LOW_ADDR (void *)(0x40000000)
+#define LOW_ADDR2 (void *)(0x50000000)
+#else
+#define LOW_ADDR (void *)(0x80000000)
+#define LOW_ADDR2 (void *)(0x90000000)
+#endif
 
 char TEMPFILE[MAXPATHLEN];
 
Signature · 13 lines
1.6.3.1


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list