22#if defined(MAIA_CLANG_COMPILER)
23#pragma GCC diagnostic push
24#pragma GCC diagnostic ignored "-Wcast-align"
49 stringstream begin, end, nextfree, number, total, totalmb, used, usedmb, available, availablemb, maxmem, maxmemmb;
50 const MFloat bytesInAMegaByte = 1048576.0;
64 string message =
"\n\nScratch:";
65 message +=
"\n-----------------------------\n";
66 message +=
"Bytes allocated:\t\t";
68 message +=
"\nTotal memory:\t\t\t";
73 message +=
"\nUsed memory:\t\t\t";
78 message +=
"\nFree memory:\t\t\t";
83 message +=
"\nMax memory:\t\t\t";
88 message +=
"\nScratch start pointer:\t\t";
90 message +=
"\nScratch end pointer:\t\t";
92 message +=
"\nNext free pointer:\t\t";
108 ScratchList::iterator iter;
111 message += (*iter)->printSelf();
135#if defined(MAIA_CLANG_COMPILER)
136#pragma GCC diagnostic pop
static size_t getAvailableMemory()
Returns the amount of available memory in scratch.
static ScratchList m_scratchSpaces
static MString printSelfReport()
Returns a shortened string summing up the scratch space state information.
static const uintptr_t ALIGNMENT_BOUNDARY
static size_t m_number_of_elements
static MString printSelf()
Returns a string summing up the scratch state information and all scratch space elements information.
Scratch(MFloat size, MInt Cells)
Constructor.
static char * getEndPointer()
Returns a pointer to the end of the scratch.
static MString printSelfScratch()
Returns a string summing up the scratch state information.
static size_t getTotalMemory()
Returns the amount of total available memory in scratch.
static size_t m_number_of_cells
static char * m_totalScratch
static size_t m_usedmemsize
const MString const MString & message
std::list< ScratchSpaceBase * > ScratchList