- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

# include/mempool.h

Go to the documentation of this file.

    00001
    00050 #ifndef MEMPOOL_H_INCLUDED
    00051 #define MEMPOOL_H_INCLUDED
    00052
    00053 #include <types.h>
    00054
    00055 struct physmem_pool;
    00056
    00060 struct mem_pool_object;
    00061
    00068 struct mem_pool {
    00073         struct mem_pool_object  *freelist;
    00074 };
    00075
    00076 extern void mem_pool_init(struct mem_pool *pool, void *start,
    00077                 size_t size, size_t objsize, unsigned int align_order);
    00078
    00079 extern void mem_pool_init_physmem(struct mem_pool *mempool,
    00080                 struct physmem_pool *phys_pool, unsigned int nr_objects,
    00081                 size_t objsize, unsigned int align_order);
    00082
    00083 void *mem_pool_alloc(struct mem_pool *pool);
    00084 void mem_pool_free(struct mem_pool *pool, const void *obj);
    00085
    00086 #endif /* MEMPOOL_H_INCLUDED */