Gröbner basis project
Codebase for research into Gröbner basis computation
|
special memory pool allocator for Grevlex_Order_Data and WGrevlex_Order_Data More...
#include <goda.hpp>
Public Member Functions | |
Grading_Order_Data_Allocator (NVAR_TYPE n) | |
sets allocator up for blocks of \(n\) gradings/variables. | |
~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 | |
TYPE * | get_new_block () |
allocates and returns a block of memory | |
void | return_used_block (TYPE *freed_block) |
returns a block of memory that is no longer needed to the pool | |
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 | |
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).