MathEngine
Home Page       Structures       File List       Functions and Macros      

MeMemoryOptions Struct Reference

Memory manager initialisation options. More...

#include <MeMemory.h>

List of all members.

Public Attributes

enum MeMemoryAllocation allocation
 Allocation implementation.

enum MeMemoryReclamation reclamation
 Reclamation policy.

size_t minArena
 suggested min size of an arena.

size_t maxArena
 suggested max size of an arena.

unsigned blockFixed
 # of fixed block sizes, 0: flex.

union {
   struct MeMemoryOptionsFlex {
      unsigned   align2Addr
      unsigned   align2Size
      size_t   minSize
      size_t   maxSize
      size_t   minTotal
      size_t   maxTotal
   }   flex
   struct MeMemoryOptionsFixed {
      unsigned   align2Addr
      size_t   minSize
      size_t   defSize
      long unsigned   minCount
      long unsigned   maxCount
   }*   fixed
block
 Manager specific options.


Detailed Description

Memory manager initialisation options.

The following is pretty obvious, except for the presence of 'minSize' and 'maxSize' for fixed size blocks. Well, the blocks are actually 'maxSize' large (plus alignment padding), but if smaller size pools are used up, a block smaller than 'maxSize' may be allocated in a 'maxSize' pool, if it is at least 'minSize' large.

Examples:

ArraysBench.c, ArraysTest.c, and MallocTest.c.


The documentation for this struct was generated from the following file:
MathEngine Utilities: Memory Manager API - Version 0.0.5 Alpha - Reference Manual generated using doxygen at Wed Oct 11 00:34:57 2000

Copyright MathEngine PLC 2000, all rights reserved.