From: Camm Maguire Date: Mon, 30 Dec 2019 15:46:22 +0000 (+0000) Subject: defined_real_maxpage X-Git-Tag: archive/raspbian/2.6.12-92+rpi1^2~56 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=23d2ceaf0848a3d5fa0170b58a7a43076111747b;p=gcl.git defined_real_maxpage Gbp-Pq: Name defined_real_maxpage --- diff --git a/h/386-gnu.h b/h/386-gnu.h index 7c23da6d..da78e833 100755 --- a/h/386-gnu.h +++ b/h/386-gnu.h @@ -59,3 +59,5 @@ #define RELOC_H "elf32_i386_reloc.h" #define NEED_STACK_CHK_GUARD + +#define DEFINED_REAL_MAXPAGE (1UL<<18) /*FIXME brk probe broken*/ diff --git a/h/m68k-linux.h b/h/m68k-linux.h index 79af62a3..5d115ccf 100755 --- a/h/m68k-linux.h +++ b/h/m68k-linux.h @@ -78,3 +78,5 @@ int cacheflush(void *,int,int,int); #define RELOC_H "elf32_m68k_reloc.h" #define NEED_STACK_CHK_GUARD + +#define DEFINED_REAL_MAXPAGE (1UL<<18) /*FIXME brk probe broken*/ diff --git a/h/sh4-linux.h b/h/sh4-linux.h index 4ee9a042..70fc83b2 100755 --- a/h/sh4-linux.h +++ b/h/sh4-linux.h @@ -56,3 +56,5 @@ #define RELOC_H "elf32_sh4_reloc.h" #define NEED_STACK_CHK_GUARD + +#define DEFINED_REAL_MAXPAGE (1UL<<18) /*FIXME brk probe broken*/ diff --git a/o/main.c b/o/main.c index 9b10de42..995d31f3 100755 --- a/o/main.c +++ b/o/main.c @@ -302,6 +302,9 @@ update_real_maxpage(void) { } #endif +#ifdef DEFINED_REAL_MAXPAGE + real_maxpage=DEFINED_REAL_MAXPAGE; +#else massert(cur=sbrk(0)); beg=data_start ? data_start : cur; for (i=0,j=(1L<PAGESIZE;j>>=1) @@ -311,7 +314,8 @@ update_real_maxpage(void) { i+=j; } massert(!mbrk(cur)); - +#endif + phys_pages=ufmin(get_phys_pages1(0)+page(beg),real_maxpage)-page(beg); get_gc_environ();