shm_allocator.h File Reference

#include "shm_ptr.h"
#include "scoped_lock.h"

Include dependency graph for shm_allocator.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  shm_allocator
 Shared memory allocator for use with template containers. More...
struct  shm_allocator::shm_allocator_block
 shared memory allocation block More...
struct  shm_allocator::shm_allocator_header
 shared memory allocator header structure More...

Defines

#define SHM_ALLOCATOR_H   1
#define get_block(c)   ((shm_allocator_block *)(c.get(seg)))
#define next_block(c)   ((shm_allocator_block *)((c->next).get(seg)))
#define prev_block(c)   ((shm_allocator_block *)((c->prev).get(seg)))
#define set_next_block(b, n)   ((b->next).reset(n,seg))
#define set_prev_block(b, n)   ((b->prev).reset(n,seg))
#define block_size(c)   (c->size)
#define overhead()   sizeof(shm_allocator_header)+sizeof(shm_allocator_block)
#define get_freelist()   ((shm_allocator_block *)(header->freelist.get(seg)))
#define set_freelist(b)   (header->freelist.reset(b,seg))


Define Documentation

#define block_size (  )     (c->size)

Definition at line 64 of file shm_allocator.h.

Referenced by shm_allocator::insert_block().

#define get_block (  )     ((shm_allocator_block *)(c.get(seg)))

Definition at line 59 of file shm_allocator.h.

 
#define get_freelist (  )     ((shm_allocator_block *)(header->freelist.get(seg)))

Definition at line 81 of file shm_allocator.h.

Referenced by shm_allocator::alloc(), shm_allocator::insert_block(), and shm_allocator::remove_block().

#define next_block (  )     ((shm_allocator_block *)((c->next).get(seg)))

Definition at line 60 of file shm_allocator.h.

Referenced by shm_allocator::alloc(), shm_allocator::insert_block(), and shm_allocator::remove_block().

 
#define overhead (  )     sizeof(shm_allocator_header)+sizeof(shm_allocator_block)

Definition at line 80 of file shm_allocator.h.

Referenced by shm_allocator::init_allocator_header().

#define prev_block (  )     ((shm_allocator_block *)((c->prev).get(seg)))

Definition at line 61 of file shm_allocator.h.

Referenced by shm_allocator::insert_block(), and shm_allocator::remove_block().

#define set_freelist (  )     (header->freelist.reset(b,seg))

Definition at line 82 of file shm_allocator.h.

Referenced by shm_allocator::insert_block(), and shm_allocator::remove_block().

#define set_next_block ( b,
 )     ((b->next).reset(n,seg))

Definition at line 62 of file shm_allocator.h.

Referenced by shm_allocator::insert_block(), and shm_allocator::remove_block().

#define set_prev_block ( b,
 )     ((b->prev).reset(n,seg))

Definition at line 63 of file shm_allocator.h.

Referenced by shm_allocator::insert_block(), and shm_allocator::remove_block().

#define SHM_ALLOCATOR_H   1

Header
/cvsroot/shmq/Library/src/shm_allocator.h,v 1.2 2006/09/02 18:47:28 oommoo Exp

Definition at line 5 of file shm_allocator.h.


Project shmq hosted by   SourceForge.net
Documentation generated on Sat Sep 2 10:07:40 2006 for shmq by   doxygen.org 1.4.6