mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Noted TODO
This commit is contained in:
parent
1505274640
commit
87def0fc67
1 changed files with 6 additions and 2 deletions
|
@ -2593,6 +2593,7 @@ void GC(cont, args, num_args) closure cont; object *args; int num_args;
|
|||
int scani = 0, alloci = 0; // TODO: not quite sure how to do this yet, want to user pointers but realloc can move them... need to think about how this will work
|
||||
int heap_grown = 0;
|
||||
|
||||
fprintf("DEBUG, started minor GC\n"); // JAE DEBUG
|
||||
// Prevent overrunning buffer
|
||||
if (num_args > NUM_GC_ANS) {
|
||||
printf("Fatal error - too many arguments (%d) to GC\n", num_args);
|
||||
|
@ -2706,11 +2707,14 @@ void GC(cont, args, num_args) closure cont; object *args; int num_args;
|
|||
// Check if we need to do a major GC
|
||||
if (heap_grown) {
|
||||
size_t freed = 0;
|
||||
// TODO: not good enough, need to pass current cont/args
|
||||
// what about mutation barrier, do we care at this point???
|
||||
fprintf("DEBUG, starting major mark/sweep GC\n"); // JAE DEBUG
|
||||
TODO: not good enough, need to pass current cont/args
|
||||
what about mutation barrier, do we care at this point???
|
||||
I don't think so because those are just updates to globals
|
||||
gc_collect(Cyc_heap, &freed);
|
||||
}
|
||||
|
||||
fprintf("DEBUG, finished minor GC\n"); // JAE DEBUG
|
||||
longjmp(jmp_main,1); // Return globals gc_cont, gc_ans
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue