Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Tango with nedmalloc

Moderators: larsivi kris

Posted: 08/16/09 23:36:35

Has anyone tried using nedmalloc instead of default malloc with tango? If so, what is the procedure to do so - if at all possible?

Also, if someone has tried it - how is the performance with Tango? My gut feeling says they would not mix together very well - but I would gladly be proven wrong.

PS Somewhat quiet around the forum, where are you guys hangin', apart from IRC? :)

Author Message

Posted: 08/17/09 09:16:21

I don't think anyone tried, although it has been discussed.

The main issue would be that unless you avoid the GC completely, there probably isn't much point. Integrating the nedmalloc algorithms in the GC could possibly be interesting, but probably far from easy.

And for the quietness - I guess it is just a quiet period for various reasons :) There aren't any other particular forums for discussion for Tango.

Posted: 08/21/09 02:27:48

not aware of anyone trying that yet, Keyframe ... you'd be the first :)

Posted: 08/22/09 15:31:58 -- Modified: 08/22/09 15:34:35 by
Keyframe

I've tried it - it works! However it is slower than snn.ilb malloc/free. There is an issue with snn.lib malloc and free though - they NEVER release the memory back to the OS after 'free' calls. Try a simple program that mallocates and then frees stuff for a bit - after memory is exhausted it starts to trash page swaps and then dies. This is NOT tango related (confirmed) - I have sent an email to Walter about it so he can have a look in snn, since that abyss is beyond me - I didn't get a reply, yet.

Maybe that 'bug' is the reason why snn is faster than nedmalloc - however, nedmalloc at least returns it's stuff back to the OS :)

edit: forgot to say that that 'bug' with snn is confirmed on windows only. Reportedly, but not sure myself, it is not inherent on other platforms.

Posted: 08/22/09 16:18:03

snn.lib is a windows library - the normal (GNU) C runtime is used on Linux, and probably something similar on OSX.