-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update README.emscripten #651
Conversation
@juj Do you agree with the readme change? |
I would recommend expanding on the comment a little bit.. right now it might give a misimpression that adding the spill-pointers pass or scanning the stack would be unconditionally required - which it isn't, if user only triggers a GC at points when it is known there are no managed objects on the stack. So I would recommend stating the readme in a way that would illustrate that there are these two strategies that one can use, and also illustrate about the drawbacks of each. The challenge with using --spill-pointers is that it greatly increases generated code size on disk, and there may also be a small % performance penalty to doing so. |
Do you have some example code for the strategy where one triggers the GC only at specific points which we can link to in the README? I guess this requires some modifications of the bdwgc source code to avoid the automatic GC runs, right? At the moment, your description of how this strategy works is somewhat cryptic to me and therefore it is hard for me to write a good summary for the README. |
GC_disable() might be useful to avoid automatic GC |
Yeah, |
Yes, GC_enable() is needed otherwise GC_collect() is no-op. |
Add a note about the strategies than can be employed in order for the gc to work correctly.
Alright, I have extended the description in the README file a bit. I hope that should do it. |
Looks really good! |
PR #651 (bdwgc). Update README.emscripten adding a note about the strategies that could be employed in order for the collector to work correctly. * docs/platforms/README.emscripten: Add info about strategies to deal with Emscripten limitation of scanning data roots on stack; update how-to-build instruction.
Merged. |
Closes #650