POV-Ray : Newsgroups : povray.general : Peak memory usage : Re: Peak memory usage Server Time: 29 Oct 2020 23:25:27 GMT
  Re: Peak memory usage  
From: Bill Pragnell
Date: 14 Sep 2020 22:10:00
Thorsten <tho### [at] trfde> wrote:
> It wasn't removed, the data is just no longer available in 3.7 and later
> because it used to be collected by a non-thread-safe addition and
> subtraction. Back when 3.7 was developed, there was no thread-safe AND
> portable way to do this.
> With the atomic integer functions in the newer STLs (C++ 2014 and
> forward, I think) that has been solved, but now this would require also
> overloading the default allocators for new and delete given most
> allocation works by way of the STL rather than malloc and free.

Aha, thank you, that's very informative. I hadn't realised POV-Ray kept count of
its own allocation, I think I'd assumed some system magic.

I had a brief look through the code, but I don't really know it well. So the
POV_MALLOC (et al) macros did the memory tracking, but this was turned off when
it became inaccurate for the multithreading, and now they've mostly been
replaced with new and delete?

Post a reply to this message

Copyright 2003-2008 Persistence of Vision Raytracer Pty. Ltd.