Gröbner basis project
Codebase for research into Gröbner basis computation
|
Classes and other structures related to memory management. More...
Classes | |
union | goda_block< TYPE > |
heart of the memory pool allocator (Grading_Order_Data_Allocator) More... | |
class | Grading_Order_Data_Allocator< TYPE > |
special memory pool allocator for Grevlex_Order_Data and WGrevlex_Order_Data More... | |
Variables | |
Grading_Order_Data_Allocator< DEG_TYPE > * | doda = nullptr |
memory manager for ray entries More... | |
Grading_Order_Data_Allocator< WT_TYPE > * | goda = nullptr |
Memory manager for graded ordering data. More... | |
Grading_Order_Data_Allocator< EXP_TYPE > * | moda = nullptr |
memory manager for monomial exponents More... | |
Grading_Order_Data_Allocator< Monomial > * | monoda = nullptr |
memory manager for monomials (not their exponents; see moda for that). More... | |
Grading_Order_Data_Allocator< Monomial_Node > * | monododa = nullptr |
memory manager for Monomial_Node More... | |
Grading_Order_Data_Allocator< WGrevlex_Order_Data > * | woda = nullptr |
Memory manager for graded orderings (not their data; see goda for that). More... | |
Classes and other structures related to memory management.
These classes create memory pools that allocate large blocks of memory, each of which contains an enormous number of subblocks that can be obtained and released in \(O(1)\) time (or at least much more efficiently than new()
and delete()
).
union goda_block |
heart of the memory pool allocator (Grading_Order_Data_Allocator)
Class Members | ||
---|---|---|
TYPE * | data | the data contained in this block |
goda_block * | next | pointer to the next free block |
class Grading_Order_Data_Allocator |
special memory pool allocator for Grevlex_Order_Data and WGrevlex_Order_Data
This is a quick-n-dirty memory pool allocator for Grevlex_Order_Data and WGrevlex_Order_Data. It isn't quite \(O(1)\) but the plan is to fix that eventually (I have to locate my notes from class).
Public Member Functions | |
Grading_Order_Data_Allocator (NVAR_TYPE n) | |
sets allocator up for blocks of \(n\) of type TYPE . More... | |
~Grading_Order_Data_Allocator () | |
releases all memory — you'd better have freed yours! | |
goda_block< TYPE > * | allocate_new_block () |
allocates a new superblock of almost 10000 blocks More... | |
TYPE * | get_new_block () |
allocates and returns a block of memory More... | |
void | return_used_block (TYPE *freed_block) |
returns a block of memory that is no longer needed to the pool More... | |
Protected Attributes | |
goda_block< TYPE > * | big_blocks |
pointer to the superblock of all blocks | |
goda_block< TYPE > * | block |
pointer to the next free block | |
const unsigned | data_size |
how many words to step from one block to the next | |
|
inline |
sets allocator up for blocks of \(n\) of type TYPE
.
n | number of objects of type TYPE that should be allocated initially |
The Grading_Order_Data_Allocator can and will allocate new blocks of n
objects when it runs out of room.
|
inline |
|
inline |
|
inline |
Grading_Order_Data_Allocator<DEG_TYPE>* doda = nullptr |
memory manager for ray entries
Automatically initialized, but clients need to call the destructor when finished.
Definition at line 122 of file lp_solver.cpp.
Grading_Order_Data_Allocator<WT_TYPE>* goda = nullptr |
Memory manager for graded ordering data.
Automatically initialized, but clients need to call the destructor when finished.
Definition at line 34 of file particular_orderings.cpp.
Grading_Order_Data_Allocator<EXP_TYPE>* moda = nullptr |
memory manager for monomial exponents
Automatically initialized, but clients need to call the destructor when finished.
Definition at line 46 of file monomial.cpp.
Grading_Order_Data_Allocator<Monomial>* monoda = nullptr |
memory manager for monomials (not their exponents; see moda for that).
Automatically initialized, but clients need to call the destructor when finished.
Definition at line 53 of file monomial.cpp.
Grading_Order_Data_Allocator<Monomial_Node>* monododa = nullptr |
memory manager for Monomial_Node
Automatically initialized, but clients need to call the destructor when finished.
Definition at line 29 of file polynomial_linked_list.cpp.
Grading_Order_Data_Allocator<WGrevlex_Order_Data>* woda = nullptr |
Memory manager for graded orderings (not their data; see goda for that).
Automatically initialized, but clients need to call the destructor when finished.
Definition at line 42 of file particular_orderings.cpp.