generator-rs
generator-rs copied to clipboard
Any way to get stack start of generator?
Hello! How do I get stack start of generator? I need this for conservative roots in my GC
The Generator::into_raw
API would return the internal stack memory pointer.
The Generator::from_raw
API would convert from stack pointer back to Generator
Thanks! Would it also be possible to get saved context registers?
Actually the start of the stack memory is the saved context.
Actually the start of the stack memory is the saved context.
I am a little bit confused about this? Should I still use into_raw
? Also, does the pointer returned by into_raw
contain registers that are saved during context switch?
The memory looks like this: fixed size context memory(including saved registers) + real generator function stack.
Yes, you should use into_raw
, the pointer of the memory contains every thing needed to save.
The memory looks like this: fixed size context memory(including saved registers) + real generator function stack. Yes, you should use
into_raw
, the pointer of the memory contains every thing needed to save.
Alright, but how do I get the size of that pointer as well? I need to tell my GC the size for proper processing
The memory looks like this: fixed size context memory(including saved registers) + real generator function stack. Yes, you should use
into_raw
, the pointer of the memory contains every thing needed to save.Alright, but how do I get the size of that pointer as well? I need to tell my GC the size for proper processing. Looking at what it returns it does not look like it actually provides full access to full context information, I actually need to calculate offsets into GeneratorImpl?