Daniel
Daniel

Reputation: 4314

C: region-based memory management

I'm looking for detailed description of memory management mechanisms for C applications, especially region-based memory management. I can't find any good in-depth articles/books/tutorials about it :(

Could someone please point me to the right direction?

Upvotes: 3

Views: 934

Answers (3)

JJJ
JJJ

Reputation: 2801

There is some information about APR's memory pools:

Another example is nginx's pools which is basically regions:

Upvotes: 0

MattD
MattD

Reputation: 93

While not for C, I can say first handed that the implementation in the following paper is written in C, as a gcc-plugin. The paper here PDF is titled "Towards Region-Based Memory Management for Go." There are plenty of semantics and such to explain how the authors implement RBMM for the Go programming language.

Upvotes: 0

Viktor Latypov
Viktor Latypov

Reputation: 14467

Good reference is the original Doom source code (zone memory allocator, see here http://doom.wikia.com/wiki/Zone_memory)

Further development is Quake1 source code (hunk/zone malloc).

Not a tutorial, but a very nice implementation.

Upvotes: 2

Related Questions