[Glib Internals] Request for help: a brief explaination of gmem's design
- From: Ryan McDougall <ryan mcdougall telusplanet net>
- To: gtk-devel-list gnome org
- Subject: [Glib Internals] Request for help: a brief explaination of gmem's design
- Date: Sat, 03 Jan 2004 15:24:55 -0700
Hello,
I am steadily making my way through the source code, but I cant seem to
get my head around what gmem is doing and why -- basically I can't
visualize what its doing and why, which makes reading the code harder
than it needs to be. I can guess some, but I'd really like to *know*.
Part of the problem is that I don't think that the documentation uses
consistent terminology, ex: constantly uses area, blocks, chunks,
segments, etc. apparently interchangeably and without defining them.
Can anyone tell me if I've got this straight, and let me know what I'm
missing?
Atoms are "indivisible", contiguous bytes designed to hold whole data
types such as chars, ints, structs, etc.
Areas are like arrays of atoms, that is contiguous multiples of Atoms.
Chunks are pools (if so I think GMemPool is a better name) of
dis-contiguous sets of (possibly different sized) Areas held in a
loop-up tree, designed to act as a memory management object that knows
about which of its sub-areas are in use or can be freed.
Where am I lost? Thanks for all you help. As I said before, when I
understand these things I will be working hard to revamp the
documentation, so helping me means helping a lot of others!
Cheers,
Ryan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]