Last week I was traveling abroad, and it turned out airports and planes are not entirely bad places for a little bit of coding. I was primarily focusing on memory management — or mis-management, as it were.
For many, many years now, the memory zone implementation has stayed pretty much the same. I suppose that since this part of the code has been changed only slightly from the original Hexen/Doom implementation, we assumed it was working well enough. However, after noticing that the public MP test servers were, over a longer period of time, reserving more and more memory and ultimately causing the whole virtual server to hang, I decided it was time to take a closer look. We concluded a visual inspection would be the most informative approach, so I added a -zonedebug
option that causes the engine to show the contents of its memory heap on screen (only in _DEBUG builds). It quickly became obvious that the memory zone was misbehaving in numerous ways, causing excessive memory use and performance problems.
I detailed the most important changes in a post
in the candidate testing thread. Summarizing, memory fragmentation was reduced and handling of memory area expansion was fixed.
Barring any major new showstopper bugs, the Candidate phase for 1.9.7 ends this week. As I said back in the beginning, the goal is not to clear the bug backlog but to finalize the work we've been doing for the past seven years so that we can proceed with periodic but smaller stable releases.
Last week I was primarily focused on addressing the remaining issues for 1.9.7 - here are the highlights:
- File system fixes. I resolved an issue with the buffering of compressed lumps (i.e., it wasn't happening early enough) which caused some of the add-ons to stop working (e.g., the detail texture packs). The problem case of putting game IWADs in the Doomsday install directory and pointing to them using -iwad was also fixed.
- Game menu fixes. As well as the new dynamic page layout algorithm, menu pages can now use a "fixed" layout to position elements. This fixed layout ensures compatibility with mods that replace the menu patches used in the original games with specially designed graphics that turn the menu into (for example) a VDU panel.
I also spent some time on a few improvements to the project homepage:
- Revised Add-ons repository. I replaced the formerly static HTML page with a new dengine.net plugin which dynamically constructs the page from a config file (XML is used). This rewrite is only the start of what I hope will result in a much more interactive area of the site (I'll speak more about this in a future update).
- Revised news feed summaries. The homepage now features a summary of the latest automated build system events and developer blog posts. I was surprised to find a few changes were necessary to phpBB itself in order to get the latter working as desired (we'll need to take care when upgrading...).
- Fixed numerous validation errors that had crept into various parts of the site. Sadly there are still a couple remaining that we'll just have to live with (mainly for the social bookmarking stuff).
Now that we've cleared the to-do list for 1.9.7 my plans for the coming week are centred on updating the documentation (including engine API docs) and further improvements to the homepage.