How the Nasal GC works: Difference between revisions

Jump to navigation Jump to search
m
Line 198: Line 198:
The garbage collector itself is triggered by setting the global "needGC" flag to 1 in the globals structure and then calling the bottleneck() function: https://gitorious.org/fg/simgear/blobs/next/simgear/nasal/gc.c#line199
The garbage collector itself is triggered by setting the global "needGC" flag to 1 in the globals structure and then calling the bottleneck() function: https://gitorious.org/fg/simgear/blobs/next/simgear/nasal/gc.c#line199
In line 209, the memory region from the global pool is cast to a pointer (struct naObj**): https://gitorious.org/fg/simgear/blobs/next/simgear/nasal/gc.c#line209
In line 209, the memory region from the global pool is cast to a pointer (struct naObj**): https://gitorious.org/fg/simgear/blobs/next/simgear/nasal/gc.c#line209
the "nout" paramter is just there to update c->nfree[type] with the amount of free memory.


== Memory blocks ==
== Memory blocks ==

Navigation menu