Generated on Wed Nov 1 15:05:21 2006 for Gecode by doxygen 1.4.5

Gecode::Memory::Config Namespace Reference
[Space-memory management]


Detailed Description

Parameters defining memory management policy for spaces.


Variables

const size_t hcsz_min = 2 * 1024
 Minimal size of a heap chunk requested from the OS.
const size_t hcsz_max = 64 * 1024
 Maximal size of a heap chunk requested from the OS.
const int hcsz_inc_ratio = 8
 Increment ratio for chunk size.
const int hcsz_dec_ratio = 4
 Decrement ratio for chunk size.
const int fl_unit_size = ((sizeof(void*) == 4) ? 2 : 3)
 Unit size for free lists.
const int fl_size_min = ((sizeof(void*) == 4) ? 3 : 2)
 Minimal size for free list element.
const int fl_size_max = ((sizeof(void*) == 4) ? 3 : 2)
 Maximal size for free list element.
const int fl_refill = 8
 Number of free lists elements to allocate.


Variable Documentation

const size_t Gecode::Memory::Config::hcsz_min = 2 * 1024
 

Minimal size of a heap chunk requested from the OS.

Definition at line 37 of file memory-manager.icc.

const size_t Gecode::Memory::Config::hcsz_max = 64 * 1024
 

Maximal size of a heap chunk requested from the OS.

Maximal is not strictly true, if a contiguous memory chunk is requested that exceeds hcsz_max, a chunk will be allocated that fits that request.

Definition at line 45 of file memory-manager.icc.

const int Gecode::Memory::Config::hcsz_inc_ratio = 8
 

Increment ratio for chunk size.

If a space has requested hcsz_inc_ratio chunks of heap memory, the chunk size is doubled.

Definition at line 52 of file memory-manager.icc.

const int Gecode::Memory::Config::hcsz_dec_ratio = 4
 

Decrement ratio for chunk size.

When a space is cloned, the new clone normally inherits the current chunk size from the original space. However, if the original space has requested less than hcsz_dec_ratio heap chunks of the current chunk size, the current chunk size for the clone is halfed.

Definition at line 62 of file memory-manager.icc.

const int Gecode::Memory::Config::fl_unit_size = ((sizeof(void*) == 4) ? 2 : 3)
 

Unit size for free lists.

The unit size (given as binary logarithm) defines how big a unit of memory for free lists is. Also, it defines the alignment. Sizes of free list objects must be multiples of the unit size.

Currently, for 32 bit machines, the unit size is 4 bytes. For 64 bit machines, it is 8 bytes.

Definition at line 75 of file memory-manager.icc.

const int Gecode::Memory::Config::fl_size_min = ((sizeof(void*) == 4) ? 3 : 2)
 

Minimal size for free list element.

The minimal size is given in the number of free list units.

Currently, for 32 bit machines, the minimal size is 12 bytes. For 64 bit machines, it is 16 bytes.

Definition at line 84 of file memory-manager.icc.

const int Gecode::Memory::Config::fl_size_max = ((sizeof(void*) == 4) ? 3 : 2)
 

Maximal size for free list element.

The maximal size is given in the number of free list units.

Currently, for 32 bit machines, the maximal size is 12 bytes. For 64 bit machines, it is 16 bytes.

Definition at line 93 of file memory-manager.icc.

const int Gecode::Memory::Config::fl_refill = 8
 

Number of free lists elements to allocate.

When a request for a free list element can not be fulfilled, as the free list is empty and there is also no reusable memory available, allocate fl_refill free list elements.

Definition at line 101 of file memory-manager.icc.