Debugging memory leak.
Sean Kelly
sean at f4.ca
Mon Oct 8 12:40:00 PDT 2007
Frits van Bommel wrote:
> Sean Kelly wrote:
>
>>> - Try Tango? Is the GC different there?
>>
>> Somewhat, but void[] arrays are still treated as if they have pointers.
>
> But AFAICT tango.io.compress.Zlib doesn't allocate any of those, just
> ubyte[] arrays, and exception classes. (The unittest does use a
> MemoryConduit, which internally uses a void[], but nothing else should
> allocate void[]s for that module)
Yup. However, an annoying problem still exists with Buffer. Basically,
this class maintains a void[] reference to a block of memory allocated
as a byte[]. However, if the block is resized for any reason, the type
doing the resizing is used to determine whether the newly allocated
block contains pointers. I've been meaning to change the Tango runtime
and GC to preserve array block attributes across reallocations, but it's
a somewhat involved process and I haven't gotten to it yet.
Sean
More information about the Digitalmars-d
mailing list