adda
adda copied to clipboard
Accurate memory counting
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
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