Space-memory management
[Memory management]
Classes | |
| class | Gecode::FreeList |
| Base-class for freelist-managed objects. More... | |
| class | Gecode::RangeList |
| Lists of ranges (intervals). More... | |
Namespaces | |
| namespace | Gecode::Kernel::MemoryConfig |
Parameters defining memory management policy for spaces. | |
Functions | |
| template<class T > | |
| T * | Gecode::Space::alloc (long unsigned int n) |
| Allocate block of n objects of type T from space heap. | |
| template<class T > | |
| T * | Gecode::Space::alloc (long int n) |
| Allocate block of n objects of type T from space heap. | |
| template<class T > | |
| T * | Gecode::Space::alloc (unsigned int n) |
| Allocate block of n objects of type T from space heap. | |
| template<class T > | |
| T * | Gecode::Space::alloc (int n) |
| Allocate block of n objects of type T from space heap. | |
| template<class T > | |
| void | Gecode::Space::free (T *b, long unsigned int n) |
| Delete n objects allocated from space heap starting at b. | |
| template<class T > | |
| void | Gecode::Space::free (T *b, long int n) |
| Delete n objects allocated from space heap starting at b. | |
| template<class T > | |
| void | Gecode::Space::free (T *b, unsigned int n) |
| Delete n objects allocated from space heap starting at b. | |
| template<class T > | |
| void | Gecode::Space::free (T *b, int n) |
| Delete n objects allocated from space heap starting at b. | |
| template<class T > | |
| T * | Gecode::Space::realloc (T *b, long unsigned int n, long unsigned int m) |
| Reallocate block of n objects starting at b to m objects of type T from the space heap. | |
| template<class T > | |
| T * | Gecode::Space::realloc (T *b, long int n, long int m) |
| Reallocate block of n objects starting at b to m objects of type T from the space heap. | |
| template<class T > | |
| T * | Gecode::Space::realloc (T *b, unsigned int n, unsigned int m) |
| Reallocate block of n objects starting at b to m objects of type T from the space heap. | |
| template<class T > | |
| T * | Gecode::Space::realloc (T *b, int n, int m) |
| Reallocate block of n objects starting at b to m objects of type T from the space heap. | |
| template<class T > | |
| T ** | Gecode::Space::realloc (T **b, long unsigned int n, long unsigned int m) |
| Reallocate block of n pointers starting at b to m objects of type T* from the space heap. | |
| template<class T > | |
| T ** | Gecode::Space::realloc (T **b, long int n, long int m) |
| Reallocate block of n pointers starting at b to m objects of type T* from the space heap. | |
| template<class T > | |
| T ** | Gecode::Space::realloc (T **b, unsigned int n, unsigned int m) |
| Reallocate block of n pointers starting at b to m objects of type T* from the space heap. | |
| template<class T > | |
| T ** | Gecode::Space::realloc (T **b, int n, int m) |
| Reallocate block of n pointers starting at b to m objects of type T* from the space heap. | |
| void * | Gecode::Space::ralloc (size_t s) |
| Allocate memory on space heap. | |
| void | Gecode::Space::rfree (void *p, size_t s) |
| Free memory previously allocated with alloc (might be reused later). | |
| void * | Gecode::Space::rrealloc (void *b, size_t n, size_t m) |
| Reallocate memory block starting at b from size n to size s. | |
| template<size_t > | |
| void * | Gecode::Space::fl_alloc (void) |
| Allocate from freelist-managed memory. | |
| template<size_t > | |
| void | Gecode::Space::fl_dispose (FreeList *f, FreeList *l) |
| Return freelist-managed memory to freelist. | |
Function Documentation
| T * Gecode::Space::alloc | ( | long unsigned int | n | ) | [inline, inherited] |
Allocate block of n objects of type T from space heap.
Note that this function implements C++ semantics: the default constructor of T is run for all n objects.
Definition at line 2837 of file core.hpp.
| T * Gecode::Space::alloc | ( | long int | n | ) | [inline, inherited] |
Allocate block of n objects of type T from space heap.
Note that this function implements C++ semantics: the default constructor of T is run for all n objects.
Definition at line 2845 of file core.hpp.
| T * Gecode::Space::alloc | ( | unsigned int | n | ) | [inline, inherited] |
Allocate block of n objects of type T from space heap.
Note that this function implements C++ semantics: the default constructor of T is run for all n objects.
Definition at line 2851 of file core.hpp.
| T * Gecode::Space::alloc | ( | int | n | ) | [inline, inherited] |
Allocate block of n objects of type T from space heap.
Note that this function implements C++ semantics: the default constructor of T is run for all n objects.
Definition at line 2856 of file core.hpp.
| void Gecode::Space::free | ( | T * | b, | |
| long unsigned int | n | |||
| ) | [inline, inherited] |
Delete n objects allocated from space heap starting at b.
Note that this function implements C++ semantics: the destructor of T is run for all n objects.
Note that the memory is not freed, it is just scheduled for later reusal.
Definition at line 2863 of file core.hpp.
| void Gecode::Space::free | ( | T * | b, | |
| long int | n | |||
| ) | [inline, inherited] |
Delete n objects allocated from space heap starting at b.
Note that this function implements C++ semantics: the destructor of T is run for all n objects.
Note that the memory is not freed, it is just scheduled for later reusal.
Definition at line 2870 of file core.hpp.
| void Gecode::Space::free | ( | T * | b, | |
| unsigned int | n | |||
| ) | [inline, inherited] |
Delete n objects allocated from space heap starting at b.
Note that this function implements C++ semantics: the destructor of T is run for all n objects.
Note that the memory is not freed, it is just scheduled for later reusal.
Definition at line 2876 of file core.hpp.
| void Gecode::Space::free | ( | T * | b, | |
| int | n | |||
| ) | [inline, inherited] |
Delete n objects allocated from space heap starting at b.
Note that this function implements C++ semantics: the destructor of T is run for all n objects.
Note that the memory is not freed, it is just scheduled for later reusal.
Definition at line 2881 of file core.hpp.
| T * Gecode::Space::realloc | ( | T * | b, | |
| long unsigned int | n, | |||
| long unsigned int | m | |||
| ) | [inline, inherited] |
Reallocate block of n objects starting at b to m objects of type T from the space heap.
Note that this function implements C++ semantics: the copy constructor of T is run for all
objects, the default constructor of T is run for all remaining
objects, and the destrucor of T is run for all n objects in b.
Returns the address of the new block.
Definition at line 2888 of file core.hpp.
| T * Gecode::Space::realloc | ( | T * | b, | |
| long int | n, | |||
| long int | m | |||
| ) | [inline, inherited] |
Reallocate block of n objects starting at b to m objects of type T from the space heap.
Note that this function implements C++ semantics: the copy constructor of T is run for all
objects, the default constructor of T is run for all remaining
objects, and the destrucor of T is run for all n objects in b.
Returns the address of the new block.
Definition at line 2904 of file core.hpp.
| T * Gecode::Space::realloc | ( | T * | b, | |
| unsigned int | n, | |||
| unsigned int | m | |||
| ) | [inline, inherited] |
Reallocate block of n objects starting at b to m objects of type T from the space heap.
Note that this function implements C++ semantics: the copy constructor of T is run for all
objects, the default constructor of T is run for all remaining
objects, and the destrucor of T is run for all n objects in b.
Returns the address of the new block.
Definition at line 2911 of file core.hpp.
| T * Gecode::Space::realloc | ( | T * | b, | |
| int | n, | |||
| int | m | |||
| ) | [inline, inherited] |
Reallocate block of n objects starting at b to m objects of type T from the space heap.
Note that this function implements C++ semantics: the copy constructor of T is run for all
objects, the default constructor of T is run for all remaining
objects, and the destrucor of T is run for all n objects in b.
Returns the address of the new block.
Definition at line 2917 of file core.hpp.
| T ** Gecode::Space::realloc | ( | T ** | b, | |
| long unsigned int | n, | |||
| long unsigned int | m | |||
| ) | [inline, inherited] |
Reallocate block of n pointers starting at b to m objects of type T* from the space heap.
Returns the address of the new block.
This is a specialization for performance.
Definition at line 2966 of file core.hpp.
| T ** Gecode::Space::realloc | ( | T ** | b, | |
| long int | n, | |||
| long int | m | |||
| ) | [inline, inherited] |
Reallocate block of n pointers starting at b to m objects of type T* from the space heap.
Returns the address of the new block.
This is a specialization for performance.
Definition at line 2971 of file core.hpp.
| T ** Gecode::Space::realloc | ( | T ** | b, | |
| unsigned int | n, | |||
| unsigned int | m | |||
| ) | [inline, inherited] |
Reallocate block of n pointers starting at b to m objects of type T* from the space heap.
Returns the address of the new block.
This is a specialization for performance.
Definition at line 2978 of file core.hpp.
| T ** Gecode::Space::realloc | ( | T ** | b, | |
| int | n, | |||
| int | m | |||
| ) | [inline, inherited] |
Reallocate block of n pointers starting at b to m objects of type T* from the space heap.
Returns the address of the new block.
This is a specialization for performance.
Definition at line 2984 of file core.hpp.
| void * Gecode::Space::ralloc | ( | size_t | s | ) | [inline, inherited] |
Allocate memory on space heap.
Definition at line 2799 of file core.hpp.
| void Gecode::Space::rfree | ( | void * | p, | |
| size_t | s | |||
| ) | [inline, inherited] |
Free memory previously allocated with alloc (might be reused later).
Definition at line 2803 of file core.hpp.
| void * Gecode::Space::rrealloc | ( | void * | b, | |
| size_t | n, | |||
| size_t | m | |||
| ) | [inline, inherited] |
Reallocate memory block starting at b from size n to size s.
Definition at line 2807 of file core.hpp.
| void * Gecode::Space::fl_alloc | ( | void | ) | [inline, inherited] |
Allocate from freelist-managed memory.
Definition at line 2822 of file core.hpp.
