mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-24 04:25:06 +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 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;
|
int heap_grown = 0;
|
||||||
|
|
||||||
|
fprintf("DEBUG, started minor GC\n"); // JAE DEBUG
|
||||||
// Prevent overrunning buffer
|
// Prevent overrunning buffer
|
||||||
if (num_args > NUM_GC_ANS) {
|
if (num_args > NUM_GC_ANS) {
|
||||||
printf("Fatal error - too many arguments (%d) to GC\n", num_args);
|
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
|
// Check if we need to do a major GC
|
||||||
if (heap_grown) {
|
if (heap_grown) {
|
||||||
size_t freed = 0;
|
size_t freed = 0;
|
||||||
// TODO: not good enough, need to pass current cont/args
|
fprintf("DEBUG, starting major mark/sweep GC\n"); // JAE DEBUG
|
||||||
// what about mutation barrier, do we care at this point???
|
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);
|
gc_collect(Cyc_heap, &freed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fprintf("DEBUG, finished minor GC\n"); // JAE DEBUG
|
||||||
longjmp(jmp_main,1); // Return globals gc_cont, gc_ans
|
longjmp(jmp_main,1); // Return globals gc_cont, gc_ans
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue