On 12/04/2012, at 8:54 AM, john skaller wrote: [] BTW: there is a crash causing bug in the webserver I haven't got around to fixing because it's a general problem with the Garbage Collector:
The gc monitors its own allocations, but not foreign allocations. In the webserver, there are lots of BIG C++ strings floating around. The objects owning these are managed by the GC but they don't use up much memory. So the GC thinks a small amount of memory is in use and doesn't clean up, when attached to those objects is 10 to 100 times more invisible memory. The gc can "fix" this inside Felix if you actually run out of memory when calling "malloc" by calling the GC when it returns 0, but it cannot "fix" it when the call is external, eg in C++ string class. In C++ there's a hook for out of memory. Felix could also use that to call the collector. What Boehm does is hook malloc using linker tricks, and replaces malloc. This is nasty. Replacing malloc means you still have to call malloc for the replacement to get memory, using _malloc or something system dependent. Also you have to carefully link so malloc of ALL code goes to the replacement. There's another solution.. get rid of C++ strings. They have problems and I have to say I'm partly to blame for making them mutable and STL compliant .. instead of immutable values. Kudos to Pete Becker for opposing the whole C++ committee on this, including me: he was right. Still even if I can make a better string model, we'd still have to cope with C++ strings across interface boundaries. -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language