POV-Ray : Newsgroups : povray.general : Peak memory usage : Re: Peak memory usage Server Time
17 Apr 2024 23:45:25 EDT (-0400)
  Re: Peak memory usage  
From: Bill Pragnell
Date: 14 Sep 2020 18:10:00
Message: <web.5f5fe9df3fd2a1f61b6c6b3a0@news.povray.org>
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-2023 Persistence of Vision Raytracer Pty. Ltd.