On 03/06/2014, at 1:58 AM, Ryan Gonzalez wrote: > I didn't see a call to the garbage collector in impl_allocate in > flx_collector.cpp. All it does is increment the statistics. I saw a > world_stop call in impl_collect. >
That's right. The call is in flx_gc.cpp in gc_profile_t::allocate(). That calls gc_profile_t::actually_collect() which calls gc_collector_t::collect() which calls flx_ts_collector_t::v_collect(). Which calls impl_collect() WITHOUT locking. There's a comment in the code specifically noting there is no mutex so that's deliberate. impl_collect calls world_stop(), then either does the collection, or just calls yield if one is already underway. yield should wait until the collection is complete. Maybe the code is right and the bug is elsewhere. But it would be good if someone walked through the code and verified its correctness. As an experiment you can write some looping code in which you do some stuff, and add a pthread which calls the collector every so many seconds (that's what the web server does). Set FLX_REPORT_COLLECTIONS=1 to see the activity. It should run forever. -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language