BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
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 52 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 |
anonymous enum |
|
inline |
Definition at line 59 of file StackAllocator.h.
References default_size, fBlockCount, fStack, and fStackOffset.
|
inline |
|
inline |
|
inline |
Definition at line 75 of file StackAllocator.h.
References AlignedSize(), CheckConsistency(), CheckOverflow(), default_size, fBlockCount, fStack, fStackOffset, and WriteInt().
Referenced by ROOT::Minuit2::BasicFunctionGradient::operator new(), ROOT::Minuit2::BasicFunctionMinimum::operator new(), ROOT::Minuit2::BasicMinimumError::operator new(), ROOT::Minuit2::BasicMinimumParameters::operator new(), ROOT::Minuit2::BasicMinimumSeed::operator new(), ROOT::Minuit2::BasicMinimumState::operator new(), ROOT::Minuit2::MnReferenceCounter::operator new(), ROOT::Minuit2::LASymMatrix::operator=(), and ROOT::Minuit2::LAVector::operator=().
|
inline |
Definition at line 171 of file StackAllocator.h.
References fBlockCount, fStackOffset, and ReadInt().
Referenced by Allocate(), and Deallocate().
|
inline |
Definition at line 164 of file StackAllocator.h.
References default_size, and fStackOffset.
Referenced by Allocate().
|
inline |
Definition at line 104 of file StackAllocator.h.
References CheckConsistency(), fBlockCount, fStackOffset, ReadInt(), ToInt(), and WriteInt().
Referenced by ROOT::Minuit2::LASymMatrix::~LASymMatrix(), ROOT::Minuit2::LAVector::~LAVector(), ROOT::Minuit2::BasicFunctionGradient::operator delete(), ROOT::Minuit2::BasicFunctionMinimum::operator delete(), ROOT::Minuit2::BasicMinimumError::operator delete(), ROOT::Minuit2::BasicMinimumParameters::operator delete(), ROOT::Minuit2::BasicMinimumSeed::operator delete(), ROOT::Minuit2::BasicMinimumState::operator delete(), and ROOT::Minuit2::MnReferenceCounter::operator delete().
|
inline |
Definition at line 133 of file StackAllocator.h.
References fStack.
Referenced by CheckConsistency(), and Deallocate().
|
inline |
|
inline |
Definition at line 141 of file StackAllocator.h.
References fStack.
Referenced by Allocate(), and Deallocate().
|
private |
Definition at line 210 of file StackAllocator.h.
Referenced by StackAllocator(), Allocate(), CheckConsistency(), and Deallocate().
|
private |
Definition at line 207 of file StackAllocator.h.
Referenced by StackAllocator(), ~StackAllocator(), Allocate(), ReadInt(), ToInt(), and WriteInt().
|
private |
Definition at line 209 of file StackAllocator.h.
Referenced by StackAllocator(), Allocate(), CheckConsistency(), CheckOverflow(), and Deallocate().