diff options
author | Youness Alaoui <youness.alaoui@collabora.co.uk> | 2010-10-20 21:33:24 +0200 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2010-11-24 19:12:10 -0500 |
commit | a7b27bc2d094582c91c77f91b5198686e8a86775 (patch) | |
tree | 83b3ea05095dfe684aae59339f5a23f03b262e1f /sys | |
parent | 0de362f248bf0ba5c5f2a7e5e87198f5a17ca60f (diff) |
shm: Explain some fields
Explain what some of the fields in the allocator actually mean
Diffstat (limited to 'sys')
-rw-r--r-- | sys/shm/shmalloc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/shm/shmalloc.c b/sys/shm/shmalloc.c index e4a9a5ad9a..67bae732fc 100644 --- a/sys/shm/shmalloc.c +++ b/sys/shm/shmalloc.c @@ -33,22 +33,30 @@ #include <string.h> #include <assert.h> +/* This is the allocated space to hold multiple blocks */ struct _ShmAllocSpace { + /* The total size of this space */ size_t size; + /* chained list of the blocks contained in this space */ ShmAllocBlock *blocks; }; +/* A single block of data */ struct _ShmAllocBlock { int use_count; + /* Pointer back to the AllocSpace where this block is */ ShmAllocSpace *space; + /* The offset of this block in the alloc space */ unsigned long offset; + /* The size of the block */ unsigned long size; + /* Pointer to the next block in the chain */ ShmAllocBlock *next; }; |