should have been easy.
This commit is contained in:
parent
707a3b9925
commit
98c849c087
9
C/agc.c
9
C/agc.c
@ -331,10 +331,11 @@ mark_global_cell(CELL *pt)
|
||||
(((MP_INT *)(pt+2))->_mp_alloc*sizeof(mp_limb_t)))/sizeof(CELL);
|
||||
Opaque_CallOnGCMark f;
|
||||
Opaque_CallOnGCRellocate f2;
|
||||
Term t = AbsAppl(pt);
|
||||
|
||||
if ( (f = Yap_blob_gc_mark_handler(reg)) ) {
|
||||
if ( (f = Yap_blob_gc_mark_handler(t)) ) {
|
||||
CELL ar[256];
|
||||
Int i,n = (f)(Yap_BlobTag(reg), Yap_BlobInfo(reg), ar, 256);
|
||||
Int i,n = (f)(Yap_BlobTag(t), Yap_BlobInfo(t), ar, 256);
|
||||
if (n < 0) {
|
||||
Yap_Error(OUT_OF_HEAP_ERROR,TermNil,"not enough space for slot internal variables in agc");
|
||||
}
|
||||
@ -345,8 +346,8 @@ mark_global_cell(CELL *pt)
|
||||
*pt = AtomTermAdjust(reg);
|
||||
}
|
||||
}
|
||||
if ( (f2 = Yap_blob_gc_rellocate_handler(reg)) < 0 ) {
|
||||
int out = (f2)(Yap_BlobTag(reg), Yap_BlobInfo(reg), ar, n);
|
||||
if ( (f2 = Yap_blob_gc_rellocate_handler(t)) < 0 ) {
|
||||
int out = (f2)(Yap_BlobTag(t), Yap_BlobInfo(t), ar, n);
|
||||
if (out < 0)
|
||||
Yap_Error(OUT_OF_HEAP_ERROR,TermNil,"bad restore of slot internal variables in agc");
|
||||
}
|
||||
|
9
C/grow.c
9
C/grow.c
@ -579,10 +579,11 @@ AdjustGlobal(long sz, int thread_copying USES_REGS)
|
||||
(((MP_INT *)(pt+2))->_mp_alloc*sizeof(mp_limb_t)))/CellSize;
|
||||
Opaque_CallOnGCMark f;
|
||||
Opaque_CallOnGCRellocate f2;
|
||||
Term t = AbsAppl(pt);
|
||||
|
||||
if ( (f = Yap_blob_gc_mark_handler(reg)) ) {
|
||||
if ( (f = Yap_blob_gc_mark_handler(t)) ) {
|
||||
CELL ar[256];
|
||||
Int i,n = (f)(Yap_BlobTag(reg), Yap_BlobInfo(reg), ar, 256);
|
||||
Int i,n = (f)(Yap_BlobTag(t), Yap_BlobInfo(t), ar, 256);
|
||||
if (n < 0) {
|
||||
Yap_Error(OUT_OF_HEAP_ERROR,TermNil,"not enough space for slot internal variables");
|
||||
}
|
||||
@ -605,8 +606,8 @@ AdjustGlobal(long sz, int thread_copying USES_REGS)
|
||||
else if (IsAtomTerm(reg))
|
||||
*pt = AtomTermAdjust(reg);
|
||||
}
|
||||
if ( (f2 = Yap_blob_gc_rellocate_handler(reg)) < 0 ) {
|
||||
int out = (f2)(Yap_BlobTag(reg), Yap_BlobInfo(reg), ar, n);
|
||||
if ( (f2 = Yap_blob_gc_rellocate_handler(t)) < 0 ) {
|
||||
int out = (f2)(Yap_BlobTag(t), Yap_BlobInfo(t), ar, n);
|
||||
if (out < 0)
|
||||
Yap_Error(OUT_OF_HEAP_ERROR,TermNil,"bad restore of slot internal variables");
|
||||
}
|
||||
|
Reference in New Issue
Block a user