On Sun, Jul 24, 2016 at 8:26 AM, Uwe Fechner <
uwe.fec...@gmail.com> wrote:
> Thanks for your answer. Some more questions:
> - is a gc frame just a pointer?
Parent point (it forms a linked list)
Length
GC Roots
> - if not, which information does it hold? In which file is the gc frame
> type/
> structure defined?
`jl_gcframe_t` in `julia.h`
> - is there exactly one gc frame for each local variable?
There's one GC frame for each ..... "scope" or whatever way you want
to group roots.
We emit one GC frame per function for JIT code.
Each root has it's own slot in the frame.
There might be duplicated roots in a frame and that's what the GC
frame optimizations are talking about.
See also the various `JL_GC_PUSH` macros in `julia.h` for how they are
created/used.
> - why is it called "frame"? The term implies, that it is around something.
> Is this the case?
Since it's an array of multiple pointers. The use of "frame" is
probably similar to that in stack frame.
P.S. Although you probably know already but just to be clear, one
don't need to worry about creating/accessing/maintaining GC frames
except for really low level stuff (GC and codegen). You are welcome to
learn more about julia internals of course.