Memory leaks

develop32 develop32 at gmail.com
Sun Oct 13 07:20:05 PDT 2013


On Sunday, 13 October 2013 at 14:01:09 UTC, Adam D. Ruppe wrote:
> On Sunday, 13 October 2013 at 13:46:13 UTC, develop32 wrote:
>> My question is, are there any more places in druntime that I 
>> can change so that I will get a notification when allocation 
>> occurs, besides _d_allocmemory?
>
> I set breakpoints on gc_malloc and gc_qalloc too. I'm pretty 
> sure they catch more than d_allocmemory.
>
> qalloc in particular catches accidental usage of array 
> literals. Yes, they always allocate at runtime unless 
> specifically marked static... i'd love for that to change!

Thank you, that helped to find it.
Its as shame that usage of static arrays doesn't prevent heap 
allocation.


More information about the Digitalmars-d-learn mailing list