ARSD PNG memory usage

Joerg Joergonson via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jun 17 18:57:49 PDT 2016


On Saturday, 18 June 2016 at 01:46:32 UTC, Adam D. Ruppe wrote:
> On Saturday, 18 June 2016 at 01:44:28 UTC, Joerg Joergonson 
> wrote:
>> I simply removed your nextpowerof2 code(so the width and 
>> height wasn't being enlarged) and saw no memory change). 
>> Obviously because they are temporary buffers, I guess?
>
> right, the new code free() them right at scope exit.
>
>> If this is the case, then maybe there is one odd temporary 
>> still hanging around in png?
>
> Could be, though the png itself has relatively small overhead, 
> and the opengl texture adds to it still. I'm not sure if video 
> memory is counted by task manager or not... but it could be 
> loading up the whole ogl driver that accounts for some of it. I 
> don't know.

Ok. Also, maybe the GC hasn't freed some of those temporaries 
yet. What's strange is that when the app is run, it seems to do a 
lot of small allocations around 64kB or something for about 10 
seconds(I watch the memory increase in TM) then it stabilizes. 
Not a big deal, just seems a big weird(maybe some type of lazy 
allocations going on)


Anyways, I'm much happier now ;) Thanks!


More information about the Digitalmars-d-learn mailing list