deadlock avoidance.
This commit is contained in:
parent
2f852223ec
commit
6bcda04a52
2
C/grow.c
2
C/grow.c
@ -1825,7 +1825,7 @@ int
|
|||||||
Yap_locked_growtrail(long size, int contiguous_only)
|
Yap_locked_growtrail(long size, int contiguous_only)
|
||||||
{
|
{
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
return do_growtrail(size, contiguous_only, FALSE, NULL, NULL, NULL PASS_REGS);
|
return do_growtrail(size, contiguous_only, FALSE, NULL, NULL, NULL PASS_REGS);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -3992,7 +3992,7 @@ do_gc(Int predarity, CELL *current_env, yamop *nextop USES_REGS)
|
|||||||
#if !USE_SYSTEM_MALLOC
|
#if !USE_SYSTEM_MALLOC
|
||||||
if (HeapTop >= LOCAL_GlobalBase - MinHeapGap) {
|
if (HeapTop >= LOCAL_GlobalBase - MinHeapGap) {
|
||||||
*--ASP = (CELL)current_env;
|
*--ASP = (CELL)current_env;
|
||||||
if (!Yap_growheap(FALSE, MinHeapGap, NULL)) {
|
if (!Yap_locked_growheap(FALSE, MinHeapGap, NULL)) {
|
||||||
Yap_Error(OUT_OF_HEAP_ERROR, TermNil, LOCAL_ErrorMessage);
|
Yap_Error(OUT_OF_HEAP_ERROR, TermNil, LOCAL_ErrorMessage);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -4014,7 +4014,7 @@ do_gc(Int predarity, CELL *current_env, yamop *nextop USES_REGS)
|
|||||||
|
|
||||||
*--ASP = (CELL)current_env;
|
*--ASP = (CELL)current_env;
|
||||||
if (
|
if (
|
||||||
!Yap_growtrail(sz, FALSE)
|
!Yap_locked_growtrail(sz, FALSE)
|
||||||
) {
|
) {
|
||||||
Yap_Error(OUT_OF_TRAIL_ERROR,TermNil,"out of %lB during gc", sz);
|
Yap_Error(OUT_OF_TRAIL_ERROR,TermNil,"out of %lB during gc", sz);
|
||||||
return -1;
|
return -1;
|
||||||
|
Reference in New Issue
Block a user