Blender V2.61 - r43446
Classes | Typedefs | Functions

BLI_mempool.h File Reference

Simple fast memory allocator. More...

Go to the source code of this file.

Classes

struct  BLI_mempool_iter

Typedefs

typedef struct BLI_mempool BLI_mempool
typedef struct BLI_mempool_iter BLI_mempool_iter

Functions

BLI_mempoolBLI_mempool_create (int esize, int tote, int pchunk, short use_sysmalloc, short allow_iter)
void * BLI_mempool_alloc (BLI_mempool *pool)
void * BLI_mempool_calloc (BLI_mempool *pool)
void BLI_mempool_free (BLI_mempool *pool, void *addr)
void BLI_mempool_destroy (BLI_mempool *pool)
int BLI_mempool_count (BLI_mempool *pool)
void * BLI_mempool_findelem (BLI_mempool *pool, int index)
void BLI_mempool_allow_iter (BLI_mempool *pool)
void BLI_mempool_iternew (BLI_mempool *pool, BLI_mempool_iter *iter)
void * BLI_mempool_iterstep (BLI_mempool_iter *iter)

Detailed Description

Simple fast memory allocator.

Author:
Geoffrey Bantle

Definition in file BLI_mempool.h.


Typedef Documentation

typedef struct BLI_mempool BLI_mempool

Definition at line 45 of file BLI_mempool.h.

iteration stuff. note: this may easy to produce bugs with


Function Documentation

void* BLI_mempool_alloc ( BLI_mempool pool)
void BLI_mempool_allow_iter ( BLI_mempool pool)
void* BLI_mempool_calloc ( BLI_mempool pool)

Definition at line 194 of file BLI_mempool.c.

References BLI_mempool_alloc(), and BLI_mempool::esize.

Referenced by CustomData_bmesh_alloc_block().

int BLI_mempool_count ( BLI_mempool pool)
BLI_mempool* BLI_mempool_create ( int  esize,
int  tote,
int  pchunk,
short  use_sysmalloc,
short  allow_iter 
)
void BLI_mempool_destroy ( BLI_mempool pool)
void* BLI_mempool_findelem ( BLI_mempool pool,
int  index 
)
void BLI_mempool_free ( BLI_mempool pool,
void *  addr 
)
void BLI_mempool_iternew ( BLI_mempool pool,
BLI_mempool_iter iter 
)
void* BLI_mempool_iterstep ( BLI_mempool_iter iter)