Kjetil Matheussen
2016-07-14 22:00:22 UTC
Hi,
I'm getting reports that my program sometimes stutter a little bit, and
that turning off the garbage collector fixes it.
So I thought I should try to minimize the root set by avoiding to load
the data segments of dynamically loaded libraries, since I know
that there are no root pointers there.
In gc.h, the most straight forward way seems to be calling
'GC_set_no_dls()',
But the documentation for it says:
"In some environments like Microsoft Windows
and Apple's Darwin, this may also prevent
registration of the main data segment as part
of the root set"
This sounds a bit scary. Is this correct?
Perhaps it's better to implement the 'GC_has_static_roots_func'
callback, and always let it return 0?
Thanks for any help.
I'm getting reports that my program sometimes stutter a little bit, and
that turning off the garbage collector fixes it.
So I thought I should try to minimize the root set by avoiding to load
the data segments of dynamically loaded libraries, since I know
that there are no root pointers there.
In gc.h, the most straight forward way seems to be calling
'GC_set_no_dls()',
But the documentation for it says:
"In some environments like Microsoft Windows
and Apple's Darwin, this may also prevent
registration of the main data segment as part
of the root set"
This sounds a bit scary. Is this correct?
Perhaps it's better to implement the 'GC_has_static_roots_func'
callback, and always let it return 0?
Thanks for any help.