notaz.gp2x.de
/
ginge.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
loader: try large mmap first
[ginge.git]
/
loader
/
emu.c
diff --git
a/loader/emu.c
b/loader/emu.c
index
2c64aa6
..
11be5ba
100644
(file)
--- a/
loader/emu.c
+++ b/
loader/emu.c
@@
-961,13
+961,15
@@
void emu_init(void *map_bottom)
exit(1);
}
exit(1);
}
-#ifdef WIZ
- // we are short on memmory on Wiz, need special handling
- extern void *host_mmap_upper(void);
- mmsp2.umem = host_mmap_upper();
-#else
+ // TODO: check if this really fails on Wiz..
mmsp2.umem = mmap(NULL, 0x2000000, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
mmsp2.umem = mmap(NULL, 0x2000000, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
+#ifdef WIZ
+ if (mmsp2.umem == MAP_FAILED) {
+ // we are short on memmory on Wiz, need special handling
+ extern void *host_mmap_upper(void);
+ mmsp2.umem = host_mmap_upper();
+ }
#endif
if (mmsp2.umem == MAP_FAILED) {
perror(PFX "mmap upper mem");
#endif
if (mmsp2.umem == MAP_FAILED) {
perror(PFX "mmap upper mem");