adda icon indicating copy to clipboard operation
adda copied to clipboard

Accurate memory counting

Open GoogleCodeExporter opened this issue 8 years ago • 1 comments

Make memory accounting more accurate, include non-major contributions and
take into account dynamic allocation/deallocation.

Original issue reported on code.google.com by yurkin on 24 Dec 2008 at 7:34

GoogleCodeExporter avatar Aug 12 '15 07:08 GoogleCodeExporter

A step in this direction was taken by r1125, which implements automatic memory 
counting for OpenCL (GPU). The main difference for CPU is that it is generally 
not possible to tell the size of the allocated memory from the pointer only. 
Some kind of table of allocated memory is required for that (which is not 
immediately trivial). 

Also making -prognosis calculate the result automatically through these 
wrappers is somewhat complicated, because some memory in make_particle.c still 
needs to be allocated to get a description of the particle (see issue 47). So 
this will require separating all malloc calls into two types - obligatory and 
real-calculation-only.

Also the same revision implements the notion of peak memory (together with 
current) for more accurate consideration of heavy allocation/deallocation in 
InitDmatrix().

r1125 - d0897e51a448aa595320fcd034c813b35da59845

Original comment by yurkin on 12 Apr 2012 at 1:03

GoogleCodeExporter avatar Aug 12 '15 07:08 GoogleCodeExporter