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 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>

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
default_size 

Definition at line 49 of file StackAllocator.h.

Constructor & Destructor Documentation

◆ StackAllocator()

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

Definition at line 51 of file StackAllocator.h.

◆ ~StackAllocator()

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

Definition at line 61 of file StackAllocator.h.

Member Function Documentation

◆ AlignedSize()

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

Definition at line 159 of file StackAllocator.h.

◆ Allocate()

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

Definition at line 70 of file StackAllocator.h.

◆ CheckConsistency()

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

Definition at line 174 of file StackAllocator.h.

◆ CheckOverflow()

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

Definition at line 166 of file StackAllocator.h.

◆ Deallocate()

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

Definition at line 102 of file StackAllocator.h.

◆ ReadInt()

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

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

Member Data Documentation

◆ fBlockCount

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

Definition at line 213 of file StackAllocator.h.

◆ fStack

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

Definition at line 210 of file StackAllocator.h.

◆ fStackOffset

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

Definition at line 212 of file StackAllocator.h.

Libraries for ROOT::Minuit2::StackAllocator:

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