From: Dan P. <ba...@al...> - 2001-11-15 06:49:43
|
I just grabbed the latest sources from Doug Lea's FTP for his dlmalloc and integrated them into KOS CVS. It seems to work and be relatively stable, but of course please let me know if anyone sees problems. Of special note, this newer dlmalloc has nice support for thread locking. I found some pretty serious bugs in the old dlmalloc (or rather, serious bugs in my thread-ization of it ^_^;;) which are fixed now. Also, I have taken a look at this and discovered that it has two cool features. The first is that the default alignment is variable, so it should be possible to build a texture or spu ram allocator using this system (which I plan to do). The second thing is that it uses relatively few global variables, so it ought to be possible to make a generic allocator which can use different pools of memory with the same code. Most of the management data is stored in the memory pool itself. I'll probably make that a special case of the current dlmalloc and make a generic allocator system for any other memory pools in whatever console / PC / whatever. I'd make the system memory allocator part of the same system, but I don't want to slow it down any further than absolutely neccessary. |