added post-gc-hooks, a list of thunks that are invoked after garbage

collection.
This commit is contained in:
Abdulaziz Ghuloum
2009-07-30 14:19:46 +03:00
parent 7d2c1b0b9e
commit af233a2ac2
4 changed files with 45 additions and 10 deletions
+11
View File
@@ -350,6 +350,7 @@ static void gc_add_tconcs(gc_t*);
*/
ikpcb* ik_collect_vararg(int req, ikpcb* pcb){
return ik_collect(req, pcb);
}
@@ -372,6 +373,16 @@ static void fix_new_pages(gc_t* gc);
extern void verify_integrity(ikpcb* pcb, char*);
ikptr ik_collect_check(unsigned long int req, ikpcb* pcb){
long int bytes = ((long int)pcb->allocation_redline) -
((long int)pcb->allocation_pointer);
if (bytes >= req) {
return true_object;
} else {
ik_collect(req, pcb);
return false_object;
}
}
ikpcb*
ik_collect(unsigned long int mem_req, ikpcb* pcb){