1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-08 04:30:45 -08:00
emacs/mps/code/poolmfs.h
Richard Brooksby 3d5e2ca85f Adding hopenames back into the master sources, so that they can be included in the union sources along with the id keywords.
This was achieved by partially undoing changelist 24817, including an accidental corruption of eventgen.pl.

Copied from Perforce
 Change: 24877
 ServerID: perforce.ravenbrook.com
2001-12-06 18:14:02 +00:00

52 lines
1.4 KiB
C

/* impl.h.poolmfs draft impl
*
* MANUAL FIXED SMALL UNIT POOL
*
* $Id$
* $HopeName: MMsrc!poolmfs.h(trunk.5) $
*
* Copyright (c) 2001 Ravenbrook Limited.
*
* The MFS pool is used to manage small fixed-size chunks of memory. It
* stores control structures in the memory it manages, rather than to one
* side. It therefore achieves better locality for small objects, but
* wastes memory for large objects. It should not be used unless you are
* packing a reasonable number of objects on to a page.
*
* Create and Init take the following arguments:
*
* Size extendBy
*
* extendBy is the default number of bytes reserved by the pool at a time.
* A large size will make allocation cheaper but have a higher resource
* overhead. A typical value might be 65536. See note 2.
*
* Size unitSize
*
* unitSize is the size in bytes of the objects you with to allocate. It
* must be larger than the minimum unit size returned by GetInfo, and not
* larger than extendBy.
*/
#ifndef poolmfs_h
#define poolmfs_h
#include "mpm.h"
typedef struct MFSStruct *MFS;
extern PoolClass PoolClassMFS(void);
extern Bool MFSCheck(MFS mfs);
extern Pool (MFSPool)(MFS mfs);
typedef const struct MFSInfoStruct *MFSInfo;
struct MFSInfoStruct {
Size unitSizeMin; /* minimum unit size */
};
extern MFSInfo MFSGetInfo(void);
#endif /* poolmfs_h */