3 ms·
Quake 2 didn't have its own memory allocator either. Maybe the system allocator(s) got better with the years. http://fabiensanglard.net/quake2/index.php http:/
by gurkendoktor 15y ago
Quake 2 didn't have its own memory allocator either. Maybe the system allocator(s) got better with the years.
http://fabiensanglard.net/quake2/index.php http://fabiensanglard.net/quake2/index.php
- klodolph 15y agoI don't know which Quake 2 you are looking at. Do a code search for Z_TagMalloc and Hunk_Alloc.
- gurkendoktor 15y agoTo quote the review (which I've read more than the source): The Zone Memory Allocator(common.c: Z_Malloc, Z_Free, Z_TagMalloc , Z_FreeTags) is still here in Quake2 but it is pretty much useless: Tagging is never used and allocation/deallocation is build on top of malloc and free (I have no idea why id software decided to trust the C Standard Library at this point). The overflow detector (using the Z_MAGIC contant) is never used either. So, unless I totally misunderstand things, it is half C stdlib, half Hunk allocator?