10#ifndef ROOT_Minuit2_StackAllocator
11#define ROOT_Minuit2_StackAllocator
20#ifdef MN_USE_STACK_ALLOC
21#define _MN_NO_THREAD_SAVE_
53#ifdef _MN_NO_THREAD_SAVE_
63#ifdef _MN_NO_THREAD_SAVE_
72#ifdef _MN_NO_THREAD_SAVE_
96 throw std::bad_alloc();
104#ifdef _MN_NO_THREAD_SAVE_
107 int nextBlock =
ReadInt(delBlock);
108 int previousBlock =
ReadInt(nextBlock -
sizeof(
int));
114 int nextNextBlock =
ReadInt(nextBlock);
115 WriteInt(nextNextBlock -
sizeof(
int), previousBlock);
117 WriteInt(previousBlock, nextNextBlock);
121#ifdef DEBUG_ALLOCATOR
151 unsigned char *pc =
static_cast<unsigned char *
>(
p);
155 int userBlock = pc -
fStack;
156 return userBlock -
sizeof(
int);
161 const int fAlignment = 4;
162 int needed = nBytes % fAlignment == 0 ? nBytes : (nBytes / fAlignment + 1) * fAlignment;
163 return needed + 2 *
sizeof(
int);
189 int beg2 =
ReadInt(end -
sizeof(
int));
225 return gStackAllocator;
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
static StackAllocator & Get()
StackAllocator controls the memory allocation/deallocation of Minuit.
void WriteInt(int offset, int Value)
void * Allocate(size_t nBytes)
void CheckOverflow(int n)
int AlignedSize(int nBytes)
define stack allocator symbol
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...