ROOT  6.06/09
Reference Guide
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 ()
 
voidAllocate (size_t nBytes)
 
void Deallocate (void *p)
 
int ReadInt (int offset)
 
void WriteInt (int offset, int Value)
 
int ToInt (void *p)
 
int AlignedSize (int nBytes)
 
void CheckOverflow (int n)
 
bool CheckConsistency ()
 

Private Attributes

unsigned char * fStack
 
int fStackOffset
 
int fBlockCount
 

#include <Minuit2/StackAllocator.h>

Member Enumeration Documentation

anonymous enum
Enumerator
default_size 

Definition at line 57 of file StackAllocator.h.

Constructor & Destructor Documentation

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

Definition at line 59 of file StackAllocator.h.

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

Definition at line 68 of file StackAllocator.h.

Member Function Documentation

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

Definition at line 158 of file StackAllocator.h.

Referenced by Allocate().

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

Definition at line 171 of file StackAllocator.h.

Referenced by Allocate(), and Deallocate().

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

Definition at line 164 of file StackAllocator.h.

Referenced by Allocate().

void ROOT::Minuit2::StackAllocator::Deallocate ( void p)
inline
int ROOT::Minuit2::StackAllocator::ReadInt ( int  offset)
inline

Definition at line 133 of file StackAllocator.h.

Referenced by CheckConsistency(), and Deallocate().

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

Definition at line 149 of file StackAllocator.h.

Referenced by Deallocate().

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

Definition at line 141 of file StackAllocator.h.

Referenced by Allocate(), and Deallocate().

Member Data Documentation

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

Definition at line 210 of file StackAllocator.h.

Referenced by Allocate(), CheckConsistency(), Deallocate(), and StackAllocator().

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

Definition at line 207 of file StackAllocator.h.

Referenced by Allocate(), ReadInt(), StackAllocator(), ToInt(), WriteInt(), and ~StackAllocator().

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

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