improve allocation through malloc: avoid allocating labels in the stack.

This commit is contained in:
Vitor Santos Costa
2010-04-15 11:37:39 +01:00
parent 78b3213d5a
commit b737ce447f
4 changed files with 32 additions and 7 deletions

View File

@@ -3560,7 +3560,7 @@ Yap_cclause(volatile Term inp_clause, int NOfArgs, Term mod, volatile Term src)
#endif
/* phase 3: assemble code */
acode = Yap_assemble(ASSEMBLING_CLAUSE, src, cglobs.cint.CurrentPred, (cglobs.is_a_fact && !cglobs.hasdbrefs && !(cglobs.cint.CurrentPred->PredFlags & TabledPredFlag)), &cglobs.cint);
acode = Yap_assemble(ASSEMBLING_CLAUSE, src, cglobs.cint.CurrentPred, (cglobs.is_a_fact && !cglobs.hasdbrefs && !(cglobs.cint.CurrentPred->PredFlags & TabledPredFlag)), &cglobs.cint, cglobs.labelno+1);
/* check first if there was space for us */
Yap_ReleaseCMem (&cglobs.cint);
if (acode == NULL) {