I want my Memory back ;-)
Steven Schveighoffer
schveiguy at yahoo.com
Tue Jul 13 05:30:03 PDT 2010
On Tue, 13 Jul 2010 03:50:19 -0400, ABothe <info at asdf.com> wrote:
> First, thanks for the response!
>
> When executing the program at your own, look at the task
> manager... It simply doesn't do it!
>
>
> Is there somebody who can make it possible for the GC to give
> allocated memory right back??
The GC does not release memory back to the OS in all circumstances, it may
hold onto the memory, even though it isn't allocated.
Part of the reason for this is it may just not be possible. IIRC, on
Linux systems, all your heap-allocated memory must be contiguous, meaning
that if you deallocate holes, you can't release them back to the OS.
There is also a design bug in the array allocator (which you probably have
not encountered, since you did not append), where it will hold onto memory
even if nothing is referencing it because the LRU cache is referencing
it. I am going to fix that in the near future.
-Steve
More information about the Digitalmars-d
mailing list