#include <QCMemory.hpp>
Definition at line 33 of file QCMemory.hpp.
Public Member Functions | |
void | disallocateBlockTmpMem (void) |
void | evaluateUsedMemory (void) |
QCFloat | getUsedMemoryMax (void) |
template<class TP> | |
bool | giveBackTmpMem (TP *QCRestrict &tmpMemPtr) |
template<class TP> | |
bool | giveBackTmpMem (TP *__restrict__ &tmpMemPtr) |
void | printQCMemory (void) |
void | printUsedMemoryMax (void) |
QCMemory (void) | |
bool | setUsedMemoryMax (const int size) |
template<class TP> | |
TP * | takeTmpMem (const int &nb) |
bool | updateBlockTmpMem (void) |
~QCMemory (void) | |
Private Attributes | |
int | blockSize |
QCFloat * | blockTmpMem |
int | curTmpMem |
QCFloat * | endOfBlock |
QCFloat * | freeMemPtr |
int | maxTmpMem |
QCStackCell * | stackPtr |
int | stackPtrIndex |
int | stackPtrMaxIndex |
Classes | |
struct | QCStackCell |
|
Definition at line 29 of file QCMemory.cpp. |
|
Definition at line 36 of file QCMemory.cpp. References disallocateBlockTmpMem(). Here is the call graph for this function: ![]() |
|
Disallocation of that memory block. Definition at line 264 of file QCMemory.cpp. References blockSize, blockTmpMem, maxTmpMem, stackPtr, QCErrorManager::UNOPTIMAL_TMP_MEM, QCErrorManager::WARNING, and QCErrorManager::writeMsg(). Referenced by ~QCMemory(). Here is the call graph for this function: ![]() |
|
Evaluation of the amount of RAM used by the application. The result is stored in a temporary file. Definition at line 303 of file QCMemory.cpp. References QCCommon::MemoryTmpFile, and QCCommon::Pid. Referenced by QCManager< TPModel, TPSystem >::runComputations(). |
|
Return the maximum amount of used RAM. Definition at line 323 of file QCMemory.cpp. References QCCommon::MemoryTmpFile, QCCommon::outdir, PATH_SEPARATOR(), QC1024, and QCCStrLen_32. Here is the call graph for this function: ![]() |
|
Ok, c est le seul cast qui marche sans Warning. Tous les autres (les C++) sifflent a cause de restrict. On exprime requestedMemSize en nombre de QCFloat. et on arrondi au superieur pour conserver toujours un bon allignement pour les double precision. Si on a deja alloue un bloc de memoire temporaire, on s en sert. Prudence, il faut annuler ce pointeur pour ne pas subir de delete malvenu derriere le giveBack. on cree le gestionnaire d erreur qui va envoyer le message d erreur. Definition at line 131 of file QCMemory.cpp. References blockTmpMem, curTmpMem, endOfBlock, QCErrorManager::ERROR, freeMemPtr, QCMemory::QCStackCell::memSize, stackPtr, stackPtrIndex, QCErrorManager::TMP_MEMORY, and QCErrorManager::writeMsg(). Here is the call graph for this function: ![]() |
|
Free the temporary memory. Be careful, the memory manager is implemented like a stack. So that its working pattern is First In - Last Out. |
|
Print the variables of the class Definition at line 365 of file QCMemory.cpp. References blockSize, blockTmpMem, curTmpMem, endOfBlock, freeMemPtr, maxTmpMem, QCMemory::QCStackCell::memPtr, QCMemory::QCStackCell::memSize, stackPtr, stackPtrIndex, and stackPtrMaxIndex. Referenced by setUsedMemoryMax(). |
|
Posting of the maximum amount of used RAM. Definition at line 355 of file QCMemory.cpp. |
|
set the maximum amount of occupied RAM. Definition at line 411 of file QCMemory.cpp. References maxTmpMem, printQCMemory(), and updateBlockTmpMem(). Here is the call graph for this function: ![]() |
|
Request for temporary memory. Be careful, the memory manager is implemented like a stack. So that its working pattern is First In - Last Out. Definition at line 49 of file QCMemory.cpp. References blockTmpMem, curTmpMem, endOfBlock, freeMemPtr, maxTmpMem, QCMemory::QCStackCell::memPtr, QCMemory::QCStackCell::memSize, stackPtr, stackPtrIndex, and stackPtrMaxIndex. |
|
Update the size of the memory block used to satisfy the request of temporary memory. Definition at line 213 of file QCMemory.cpp. References QCErrorManager::BAD_ALLOC, blockSize, blockTmpMem, curTmpMem, endOfBlock, QCErrorManager::ERROR, freeMemPtr, maxTmpMem, and QCErrorManager::writeMsg(). Referenced by QCModelMatrices::prepareIterations(), and setUsedMemoryMax(). Here is the call graph for this function: ![]() |
|
Size of the block of temporary space expressed in number of QCFloat Definition at line 165 of file QCMemory.hpp. Referenced by disallocateBlockTmpMem(), printQCMemory(), and updateBlockTmpMem(). |
|
Block of temporary memory, it's expressed in QCFloat to avoid problems of memory alignment Definition at line 149 of file QCMemory.hpp. Referenced by disallocateBlockTmpMem(), giveBackTmpMem(), printQCMemory(), takeTmpMem(), and updateBlockTmpMem(). |
|
Size of temporary memory used expressed in number of QCFloat Definition at line 137 of file QCMemory.hpp. Referenced by giveBackTmpMem(), printQCMemory(), takeTmpMem(), and updateBlockTmpMem(). |
|
Pointer towards the end of blockTmpMem Definition at line 159 of file QCMemory.hpp. Referenced by giveBackTmpMem(), printQCMemory(), takeTmpMem(), and updateBlockTmpMem(). |
|
Pointer towards the begining of the free zone in blockTmpMem Definition at line 154 of file QCMemory.hpp. Referenced by giveBackTmpMem(), printQCMemory(), takeTmpMem(), and updateBlockTmpMem(). |
|
Maximum size of temporary memory requested expressed in number of QCFloat Definition at line 143 of file QCMemory.hpp. Referenced by disallocateBlockTmpMem(), printQCMemory(), setUsedMemoryMax(), takeTmpMem(), and updateBlockTmpMem(). |
|
The intern stack of SQCStackCell of the memory manager Definition at line 170 of file QCMemory.hpp. Referenced by disallocateBlockTmpMem(), giveBackTmpMem(), printQCMemory(), and takeTmpMem(). |
|
Index of the top of the stack Definition at line 175 of file QCMemory.hpp. Referenced by giveBackTmpMem(), printQCMemory(), and takeTmpMem(). |
|
Maximum index of the top of the stack Definition at line 180 of file QCMemory.hpp. Referenced by printQCMemory(), and takeTmpMem(). |