On Friday, 15 January 2021 at 16:22:59 UTC, IGotD- wrote:
[snip]
Are we talking about the same things here? You mentioned DMD
but I was talking about programs compiled with DMD (or GDC,
LDC), not the nature of the DMD compiler in particular.
Bump the pointer and never return any memory might acceptable
for short lived programs but totally unacceptable for long
running programs, like a browser you are using right now.
Just to clarify, in a program that is made in D with the
default options, will there be absolutely no memory reclamation?
You are talking about different things.
DMD, as a program, uses the bump the pointer allocation strategy.
If you compile a D program with DMD that uses new or appends to a
dynamic array (or whenver else), then it is using the GC to do
that. You can also use malloc or your own custom strategy. The GC
will reclaim memory, but there is no guarantee that malloc or a
custom allocation strategy will.