D garbage collector and real-time systems
Yuxuan Shui via Digitalmars-d
digitalmars-d at puremagic.com
Fri Oct 28 16:02:03 PDT 2016
On Wednesday, 28 January 2015 at 07:43:35 UTC, ketmar wrote:
> On Wed, 28 Jan 2015 06:58:41 +0000, Tom wrote:
>
>> Or is there now the possibility of disabling the GC
>> altogether, or replacing it with a refcounting 'GC' etc?
>
> you still can do manual memory management with `malloc()` and
> friends. but you must be very cautious with dynamic arrays and
> slices. may be your best bet is to not use built-in dynamic
> arrays at all and write a replacement class with manual memory
> management. ah, and the same for AAs.
>
> it's possible, if somewhat cumbersome. and you can use 'dmd
> -vgc' to check for hidden allocations. so it may be not as
> simple as adding some compiler switch, but still not that hard
> too.
For manually managed arrays, containers, I would recommend the
emsicontainers (https://github.com/economicmodeling/containers)
More information about the Digitalmars-d
mailing list