Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

palloc.h File Reference


Detailed Description

Memory pool, keeping track of malloc()'ed blocks of fixed size and thereby avoiding too frequent malloc()/free()..

This is to be used for large enough blocks, otherwise walloc() or even zalloc() should be preferred.

Author:
Raphael Manfredi
Date:
2005

#include <glib.h>

Go to the source code of this file.

Data Structures

struct  pool
 A memory pool descriptor. More...


Typedefs

typedef pool pool_t
 A memory pool descriptor.


Functions

pool_tpool_create (size_t size, gint max)
 Allocate a pool descriptor.

void pool_free (pool_t *pool)
 Free a pool descriptor.

gpointer palloc (pool_t *pool)
 Allocate buffer from the pool.

void pfree (pool_t *pool, gpointer obj)
 Return a buffer to the pool.


Typedef Documentation

typedef struct pool pool_t
 

A memory pool descriptor.


Function Documentation

gpointer palloc pool_t pool  ) 
 

Allocate buffer from the pool.

void pfree pool_t pool,
gpointer  obj
 

Return a buffer to the pool.

pool_t* pool_create size_t  size,
gint  max
 

Allocate a pool descriptor.

void pool_free pool_t pool  ) 
 

Free a pool descriptor.


Generated on Sun Feb 12 10:50:05 2006 for Gtk-Gnutella by doxygen 1.3.6