slow runtime
Andrej Mitrovic
andrej.mitrovich at gmail.com
Fri Sep 10 19:44:00 PDT 2010
This page might need to be updated soon:
http://www.digitalmars.com/d/2.0/memory.html
It refers to custom allocators, overloading new and delete, and using
scope for stack allocation.
On Sat, Sep 11, 2010 at 4:40 AM, Andrej Mitrovic
<andrej.mitrovich at gmail.com> wrote:
> What about gc.disable() and gc.enable() ? If I'm sure that I won't
> allocate anything within a section of code and I have to guarantee
> realtime performance, then I could disable the gc temporarily.
> Although this is not exactly what it states in the section on memory
> management:
>
> "Call std.gc.disable() before the smooth code is run, and
> std.gc.enable() afterwards. This will cause the GC to favor allocating
> more memory instead of running a collection pass."
>
> Is the gc disabled after the call to gc.disable(), or just relaxed? If
> it's not disabled, then I'm not sure why it's named like that.
>
> On Sat, Sep 11, 2010 at 4:28 AM, Jonathan M Davis <jmdavisprog at gmail.com> wrote:
>> snip
>
More information about the Digitalmars-d-learn
mailing list