Added temporarilly a fct to calculate the memory used