Heap-memory management
[Memory management]
Detailed Description
All routines throw an exception of MemoryExhausted, if request cannot be fulfilled.
Functions | |
void * | Gecode::Memory::malloc (size_t s) |
Allocate s bytes from heap. | |
void * | Gecode::Memory::realloc (void *p, size_t s) |
Try to change memory-block starting at p to size s. | |
void | Gecode::Memory::free (void *p) |
Free memory block starting at p. | |
template<class T> | |
T * | Gecode::Memory::bmalloc (size_t n) |
Allocate block of n objects of type T from heap. | |
template<class T> | |
T * | Gecode::Memory::brealloc (T *b, size_t n, size_t m) |
Reallocate block of n objects starting at b to m objects of type T from heap. | |
template<class T> | |
T * | Gecode::Memory::bcopy (T *d, const T *s, size_t n) |
Copy n objects starting at s to d. |
Function Documentation
void * Gecode::Memory::malloc | ( | size_t | s | ) | [inline] |
void * Gecode::Memory::realloc | ( | void * | p, | |
size_t | s | |||
) | [inline] |
void Gecode::Memory::free | ( | void * | p | ) | [inline] |
template<class T>
T * Gecode::Memory::bmalloc | ( | size_t | n | ) | [inline] |
template<class T>
T * Gecode::Memory::brealloc | ( | T * | b, | |
size_t | n, | |||
size_t | m | |||
) | [inline] |
Reallocate block of n objects starting at b to m objects of type T from heap.
Definition at line 110 of file memory.icc.
template<class T>
T * Gecode::Memory::bcopy | ( | T * | d, | |
const T * | s, | |||
size_t | n | |||
) | [inline] |