fix attributed variable space allocation

This commit is contained in:
Vitor Santos Costa 2009-05-01 12:11:52 -05:00
parent ee44706d37
commit 58838b7838
2 changed files with 7 additions and 4 deletions

View File

@ -2097,8 +2097,8 @@ YAP_Init(YAP_init_args *yap_init)
yap_init->ErrorCause = Yap_ErrorMessage;
return YAP_BOOT_FROM_SAVED_ERROR;
}
if (Atts && Atts > 2048*sizeof(CELL))
Yap_AttsSize = Atts;
if (Atts && Atts*1024 > 2048*sizeof(CELL))
Yap_AttsSize = Atts*1024;
else
Yap_AttsSize = 2048*sizeof(CELL);
if (restore_result == DO_ONLY_CODE) {

View File

@ -1326,7 +1326,10 @@ Yap_InitWorkspace(UInt Heap, UInt Stack, UInt Trail, UInt Atts, UInt max_table_s
if (Stack < MinStackSpace)
Stack = MinStackSpace;
Stack = AdjustPageSize(Stack * K);
if (!Atts)
Atts = 2048*sizeof(CELL);
else
Atts = AdjustPageSize(Atts * K);
#ifdef YAPOR
worker_id = 0;
if (n_workers > MAX_WORKERS)
@ -1342,7 +1345,7 @@ Yap_InitWorkspace(UInt Heap, UInt Stack, UInt Trail, UInt Atts, UInt max_table_s
#else
Yap_InitMemory (Trail, Heap, Stack+Atts);
#endif /* YAPOR */
Yap_AttsSize = 2048*sizeof(CELL);
Yap_AttsSize = Atts;
Yap_ClauseSpace = 0;
Yap_IndexSpace_Tree = 0;
Yap_IndexSpace_EXT = 0;