StackAllocator controls the memory allocation/deallocation of Minuit.
If MN_NO_THREAD_SAVE is defined, memory is taken from a pre-allocated piece of heap memory which is then used like a stack, otherwise via standard malloc/free. Note that defining MN_NO_THREAD_SAVE makes the code thread- unsave. The gain in performance is mainly for cost-cheap FCN functions.
Definition at line 45 of file StackAllocator.h.
Public Types | |
| enum | { default_size = 524288 } |
Public Member Functions | |
| StackAllocator () | |
| ~StackAllocator () | |
| int | AlignedSize (int nBytes) |
| void * | Allocate (size_t nBytes) |
| bool | CheckConsistency () |
| void | CheckOverflow (int n) |
| void | Deallocate (void *p) |
| int | ReadInt (int offset) |
| int | ToInt (void *p) |
| void | WriteInt (int offset, int Value) |
Private Attributes | |
| int | fBlockCount |
| unsigned char * | fStack |
| int | fStackOffset |
#include <Minuit2/StackAllocator.h>
| Enumerator | |
|---|---|
| default_size | |
Definition at line 49 of file StackAllocator.h.
|
inline |
Definition at line 51 of file StackAllocator.h.
|
inline |
Definition at line 61 of file StackAllocator.h.
Definition at line 159 of file StackAllocator.h.
|
inline |
Definition at line 70 of file StackAllocator.h.
|
inline |
Definition at line 174 of file StackAllocator.h.
|
inline |
Definition at line 166 of file StackAllocator.h.
|
inline |
Definition at line 102 of file StackAllocator.h.
Definition at line 131 of file StackAllocator.h.
|
inline |
Definition at line 149 of file StackAllocator.h.
Definition at line 140 of file StackAllocator.h.
|
private |
Definition at line 213 of file StackAllocator.h.
|
private |
Definition at line 210 of file StackAllocator.h.
|
private |
Definition at line 212 of file StackAllocator.h.