handle locking more carefully (especially protect gc and stack shifting).

This commit is contained in:
Vitor Santos Costa
2014-04-23 22:41:12 +01:00
parent 83ec7d9072
commit aba5f3d88b
22 changed files with 362 additions and 136 deletions

View File

@@ -714,7 +714,9 @@ AllocHeap(unsigned long int size)
HeapUsed += size * sizeof(CELL) + sizeof(YAP_SEG_SIZE);
UNLOCK(HeapUsedLock);
UNLOCK(HeapTopLock);
LOCK(LOCAL_SignalLock);
Yap_signal(YAP_CDOVF_SIGNAL);
UNLOCK(LOCAL_SignalLock);
} else {
if (size > GLOBAL_SizeOfOverflow)
GLOBAL_SizeOfOverflow = size*sizeof(CELL) + sizeof(YAP_SEG_SIZE);