Logo ROOT   6.18/05
Reference Guide
List of all members | Public Types | Public Member Functions | Private Attributes | List of all members
ROOT::Minuit2::StackAllocator Class Reference

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)
 
voidAllocate (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>

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
default_size 

Definition at line 57 of file StackAllocator.h.

Constructor & Destructor Documentation

◆ StackAllocator()

ROOT::Minuit2::StackAllocator::StackAllocator ( )
inline

Definition at line 59 of file StackAllocator.h.

◆ ~StackAllocator()

ROOT::Minuit2::StackAllocator::~StackAllocator ( )
inline

Definition at line 68 of file StackAllocator.h.

Member Function Documentation

◆ AlignedSize()

int ROOT::Minuit2::StackAllocator::AlignedSize ( int  nBytes)
inline

Definition at line 158 of file StackAllocator.h.

◆ Allocate()

void * ROOT::Minuit2::StackAllocator::Allocate ( size_t  nBytes)
inline

Definition at line 75 of file StackAllocator.h.

◆ CheckConsistency()

bool ROOT::Minuit2::StackAllocator::CheckConsistency ( )
inline

Definition at line 171 of file StackAllocator.h.

◆ CheckOverflow()

void ROOT::Minuit2::StackAllocator::CheckOverflow ( int  n)
inline

Definition at line 164 of file StackAllocator.h.

◆ Deallocate()

void ROOT::Minuit2::StackAllocator::Deallocate ( void p)
inline

Definition at line 104 of file StackAllocator.h.

◆ ReadInt()

int ROOT::Minuit2::StackAllocator::ReadInt ( int  offset)
inline

Definition at line 133 of file StackAllocator.h.

◆ ToInt()

int ROOT::Minuit2::StackAllocator::ToInt ( void p)
inline

Definition at line 149 of file StackAllocator.h.

◆ WriteInt()

void ROOT::Minuit2::StackAllocator::WriteInt ( int  offset,
int  Value 
)
inline

Definition at line 141 of file StackAllocator.h.

Member Data Documentation

◆ fBlockCount

int ROOT::Minuit2::StackAllocator::fBlockCount
private

Definition at line 210 of file StackAllocator.h.

◆ fStack

unsigned char* ROOT::Minuit2::StackAllocator::fStack
private

Definition at line 207 of file StackAllocator.h.

◆ fStackOffset

int ROOT::Minuit2::StackAllocator::fStackOffset
private

Definition at line 209 of file StackAllocator.h.


The documentation for this class was generated from the following file: