'memory usage' bug fix

This commit is contained in:
Joachim Schoeberl 2009-01-28 21:32:30 +00:00
parent 103fe76a1d
commit b087ac2f72
2 changed files with 227 additions and 234 deletions

View File

@ -1,11 +1,5 @@
#include <iostream>
#include <iomanip>
#ifdef SSE
#include <emmintrin.h>
#endif
#include <myadt.hpp> #include <myadt.hpp>
using namespace std; using namespace std;
namespace netgen namespace netgen
@ -176,7 +170,7 @@ namespace netgen
BaseMoveableMem * pm = BaseMoveableMem::first; BaseMoveableMem * pm = BaseMoveableMem::first;
while (pm) while (pm)
{ {
long unsigned hptr = (long unsigned) p->ptr; long unsigned hptr = (long unsigned) pm->ptr;
// uintptr_t hptr = reinterpret_cast<uintptr_t>(pm->ptr); // uintptr_t hptr = reinterpret_cast<uintptr_t>(pm->ptr);
hptr /= (1024*1024); hptr /= (1024*1024);

View File

@ -12,13 +12,12 @@ namespace netgen
size_t BaseMoveableMem::used = 0; size_t BaseMoveableMem::used = 0;
char * BaseMoveableMem::largeblock = 0; char * BaseMoveableMem::largeblock = 0;
BaseMoveableMem * BaseMoveableMem::first = 0; BaseMoveableMem * BaseMoveableMem::first = NULL;
BaseMoveableMem * BaseMoveableMem::last = 0; BaseMoveableMem * BaseMoveableMem::last = NULL;
BaseMoveableMem :: BaseMoveableMem (size_t s) BaseMoveableMem :: BaseMoveableMem (size_t s)
{ {
// cout << "Construct object begin" << endl;
// Print (); // Print ();
prev = last; prev = last;