avoid over enthusiastic stack expansion.
This commit is contained in:
parent
4cdfbae62a
commit
e06ee4d4fa
10
C/globals.c
10
C/globals.c
@ -269,10 +269,10 @@ GrowArena(Term arena, CELL *pt, UInt old_size, UInt size, UInt arity)
|
|||||||
{
|
{
|
||||||
ArenaOverflows++;
|
ArenaOverflows++;
|
||||||
if (size == 0) {
|
if (size == 0) {
|
||||||
if (old_size < 1024*1024) {
|
if (old_size < 128*1024) {
|
||||||
size = old_size;
|
size = old_size;
|
||||||
} else {
|
} else {
|
||||||
size = old_size+1024*1024;
|
size = old_size+128*1024;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (size < 4096) {
|
if (size < 4096) {
|
||||||
@ -1030,11 +1030,11 @@ GetGlobalEntry(Atom at)
|
|||||||
static UInt
|
static UInt
|
||||||
garena_overflow_size(CELL *arena)
|
garena_overflow_size(CELL *arena)
|
||||||
{
|
{
|
||||||
UInt dup = ((CELL *)arena-H0)*sizeof(CELL);
|
UInt dup = (((CELL *)arena-H0)*sizeof(CELL))>>3;
|
||||||
if (dup < 64*1024*GlobalArenaOverflows)
|
if (dup < 64*1024*GlobalArenaOverflows)
|
||||||
dup = 64*1024*GlobalArenaOverflows;
|
dup = 64*1024*GlobalArenaOverflows;
|
||||||
if (dup > 16*1024*1024)
|
if (dup > 1024*1024)
|
||||||
return 16*1024*1024;
|
return 1024*1024;
|
||||||
return dup;
|
return dup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user