Error while trying to allocate memory (malloc)

Marco Leise Marco.Leise at gmx.de
Tue Aug 7 19:32:17 PDT 2012


Am Mon, 6 Aug 2012 18:25:01 +0200
schrieb Andrej Mitrovic <andrej.mitrovich at gmail.com>:

> On 8/6/12, CrudOMatic <crudomatic at gmail.com> wrote:
> > another quick question - are these allocations automatically
> > entered into the GC heap? If so then I can just disable garbage
> > collection?
> 
> No, there is the standard C malloc/free in std.c.stdlib which you're
> using, and then there's the GC.malloc and GC.free in core.memory if
> you want to allocate from the GC heap.

And in the latter case write: 
auto m_blockList = new s_blockHeader;

-- 
Marco



More information about the Digitalmars-d-learn mailing list