DEVELOPER'S BLOG

Entering Open Source - Man@log

Community has always played a major role in our game development. Our games were always open by the nature, easy to modify and extend. This time we have decided to perform an experiment and to take one little step further: we are trying to open the development process a bit.


The story


Recently we were looking for a memory profiler. We have evaluated several commercial tools, but we were not satisfied with any of them, as they were unable to provide meaningful results for our games, or they have degraded the performance of the game too much. An idea was born recently that with the allocator already being external to the game, it should be possible to replace the allocator with something which will monitor the allocations, while passing the real work to the allocator.



Welcome to Man@log


We are proud to release Mana@log, a logging memory allocator. The allocator is gathering statistics about allocations, and can send those statistics to the external application at a request. The Man@lyzer can analyze it directly, or  it can be saved for later analysis. This capability, which currently seems to be a unique capability of Man@log, allows end-users to capture memory logs and to send them to the developers for analysis, which  fits perfectly the public beta development process currently used for Arma 2 Operation Arrowhead maintenance.


The architecture


Whenever the applications allocates a memory, Man@log records a callstack of the allocation. This means no additional instrumentation is needed, and as the callstack capture is very fast, it is possible to run Man@log with the game with no siginificant performance hit. The callstack information for all active memory blocks can be requested at any time by Man@lyzer.


We have tried to design the tool so that it is universal, not tied to our games or even to the game development at all. The memory allocator interface is very simple and can be extended or replaced, possible future development might include hooking common CRT or OS allocations functions so that the Man@log works with products which are not using any custom allocator yet.


The project home page can be found at http://manalog.sourceforge.net/.


How can you contribute


Spread the word


It seems to us Windows developers have missed a tool like this for a long time. If you know any Windows developer who might be interested, let him know about the tool. The more users will the tool have, the more it is likely someone will be intersted in further maintaining and improving it.


Develop


There are many ways how the tool could be improved, esp. at the Man@lyzer side. One obvious improvement is a GUI which would allow to browse the result easily. If you are a developer, you might consider developing such GUI analysis tools, or to implement any other improvements you see as necessary.


Provide feedback


If you are using the tool, you can provide a feedback using the issue tracker for the project.


Donate


You can also show your interest in the tool by donating. Any donations will be used to cover development expenses connected with the Man@log development.


Published on