Skip to main content
gamedev.net
🔒 Locked

Article: Stack Based Memory Management System

Started by Myopic Rhino Jul 6, 2004 at 1:26 AM 2 replies 150+ views
SiCrane
SiCrane
I've taken a look at this one, and I'm not sure it's possible to salvage this article. There are numerous technical deficiencies, including an overly complicated sample implementation, and the author exhibits a large degree of ignorance about the area he's writing about.

A more in-depth complaint list:
Basically, the author has reinvented a memory-pooled, fixed-size sub-allocator, which is a well documented subject in existing literature. And while I don't want to take away his accomplishment, he uses a different set of terminology to describe his version than is commonly used, which may be confusing, and definately rubs against the current goal of increasing the professionalism of the gamedev.net article base.

Secondly, the article is just filled with bad C++. Some of my complaints would arguably be personal style points such as his use of malloc() over ::operator new() when allocating raw memory, but others are just plain wrong, such as creating and manipulating a simple stack of unsigned integers with void pointers. Additional examples would be implementing a std::allocator replacement with compiler dependent code (and incidently, incorrect compiler dependent code) and a basic ignorance of the guarantees provided by malloc() implementations with respect to alignment. That last detail actually completely invalidates the second largest section of his article.

While I'm at it, the implementation of his pooled allocator uses a separate stack for maintaining the free list, which while an interesting take on the problem, is done in a convoluted way: maintaining a the free list as a stack of indices rather than pointers to the sub blocks.

Also, descending to the nitpick arena, the article ignores many of the tradeoffs involved in doing pooled allocation. i.e. fragmentation effects, cache locality, etc.

Unless one of the other editors says they want to try to work with this guy to recover things, I'll draft a rejection e-mail in about a week.
SiCrane
SiCrane
Ok, rejection sent. Here's the contents (though, it should have been bcc'd to Dave):
Quote:

Hello,

Thank you for your article submission to GameDev.net, "Stack Based Memory Management System". I regret to inform you that your article does not meet our needs at the present time.

The largest issue is that you have independently reinvented a fixed-sized memory pooled suballocator, but this technique is already well covered in existing literature. While I don't want to take away from your accomplishment, your article does use differing terminology from accepted definitions in the area. Also, your implementation of this technique suffers from some awkwardness not demonstrated in traditional implemenations.

Additionally, there are a number of other technical issues with the article. For example, the C and C++ standards do supply an alignment guarantee for malloc(), which largely renders your entire "Optimization" section unnecessary.

As you might know, gamedev.net receives a large number of article submissions and I do apologize for any delay in getting back to you.

Thank you again, for thinking of GameDev.net,
Howard Jeng

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.