1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-24 14:30:43 -08:00
emacs/mps/code/poolmfs.h
Richard Brooksby c0bb4cd3cd Removing hopenames from the master sources.
This change will be integrated but ignored (-ay) to the gg-epcore/union sources, so that they retain HopeNames.

Copied from Perforce
 Change: 24911
 ServerID: perforce.ravenbrook.com
2001-12-07 13:19:25 +00:00

51 lines
1.3 KiB
C

/* impl.h.poolmfs draft impl
*
* MANUAL FIXED SMALL UNIT POOL
*
* $Id$
*
* 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 */