Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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 46 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 50 of file StackAllocator.h.

Constructor & Destructor Documentation

◆ StackAllocator()

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

Definition at line 52 of file StackAllocator.h.

◆ ~StackAllocator()

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

Definition at line 62 of file StackAllocator.h.

Member Function Documentation

◆ AlignedSize()

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

Definition at line 160 of file StackAllocator.h.

◆ Allocate()

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

Definition at line 71 of file StackAllocator.h.

◆ CheckConsistency()

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

Definition at line 175 of file StackAllocator.h.

◆ CheckOverflow()

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

Definition at line 167 of file StackAllocator.h.

◆ Deallocate()

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

Definition at line 103 of file StackAllocator.h.

◆ ReadInt()

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

Definition at line 132 of file StackAllocator.h.

◆ ToInt()

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

Definition at line 150 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 214 of file StackAllocator.h.

◆ fStack

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

Definition at line 211 of file StackAllocator.h.

◆ fStackOffset

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

Definition at line 213 of file StackAllocator.h.

Libraries for ROOT::Minuit2::StackAllocator:

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