pool.h
calisto-20000323/src/pool.h · 696 B
From the archive calisto-20000323.tar.gz
Download the archive « Back to the archive contents
/*
Calisto (c) 1998-1999 Peter Howkins, Matthew Howkins, Simon Howkins
$Id: pool.h,v 1.2 1999/12/28 19:50:05 peter Exp $
$Log: pool.h,v $
Revision 1.2 1999/12/28 19:50:05 peter
Created pool_stat() and the type pool_stat_t
Revision 1.1 1999/12/21 20:37:11 peter
Initial revision
*/
#ifndef pool_h
#define pool_h
#include <stddef.h>
typedef struct pool pool;
typedef struct {
size_t block_size;
unsigned usage;
unsigned capacity;
} pool_stat_t;
pool *pool_create(size_t block_size);
/* void pool_destroy(pool *pool); */
void *pool_malloc(pool *p);
void pool_free(void *block);
void pool_debug(const pool *p);
pool_stat_t pool_stat(const pool *p);
#endif /* pool_h */