Main Page | Modules | Directories | File List

ememoa_mempool_fixed.h

00001 /*
00002 ** Copyright Cedric BAIL, 2006
00003 ** contact: cedric.bail@free.fr
00004 **
00005 */
00006 
00007 #ifndef     EMEMOA_MEMPOOL_FIXED_H__
00008 # define    EMEMOA_MEMPOOL_FIXED_H__
00009 
00010 /*
00011  * @file
00012  * @brief This routine provide memory pool manipulation for fixed size structure
00013  */
00014 
00015 #include    "config.h"
00016 #include    "ememoa_mempool.h"
00017 #include    "ememoa_mempool_struct.h"
00018 
00019 #define EMEMOA_THREAD_PROTECTION    1
00020 
00021 int ememoa_mempool_fixed_init (struct ememoa_mempool_fixed_s        *memory,
00022                    unsigned int             object_size,
00023                    unsigned int             preallocated_item,
00024                    unsigned int             options,
00025                    const struct ememoa_mempool_desc_s   *desc);
00026 
00027 int ememoa_mempool_fixed_clean (struct ememoa_mempool_fixed_s       *memory);
00028 
00029 int ememoa_mempool_fixed_free_all_objects (struct ememoa_mempool_fixed_s    *memory);
00030 
00031 int ememoa_mempool_fixed_push_object (struct ememoa_mempool_fixed_s *memory,
00032                       void              *ptr);
00033 
00034 void*   ememoa_mempool_fixed_pop_object (struct ememoa_mempool_fixed_s  *memory);
00035 
00036 #ifdef DEBUG
00037 void    ememoa_mempool_fixed_display_statistic (struct ememoa_mempool_fixed_s   *memory);
00038 #else
00039 #define ememoa_mempool_fixed_display_statistic(Memory) ;
00040 #endif
00041 
00042 int ememoa_mempool_fixed_garbage_collect(struct ememoa_mempool_fixed_s  *memory);
00043 
00044 int ememoa_mempool_fixed_walk_over(struct ememoa_mempool_fixed_s    *memory,
00045                        ememoa_fctl          fctl,
00046                        void             *data);
00047 
00048 #endif      /* EMEMOA_MEMPOOL_FIXED_H__ */

Generated on Tue Mar 21 15:19:24 2006 for Ememoa by  doxygen 1.4.4