GC works with malloc() works, but throws out of memory with HeapAlloc(). Why?
Vladimir Panteleev
vladimir at thecybershadow.net
Tue Jan 4 02:50:30 PST 2011
On Tue, 04 Jan 2011 01:12:53 +0200, %u <wfunction at hotmail.com> wrote:
>
> I've recompiled the code for my library to redirect all calls to
> malloc(),
> free(), realloc(), and calloc() to HeapAlloc(), HeapFree(), and
> HeapReAlloc().
Sorry, do you mean the libc functions? The GC doesn't use those to
allocate its memory pools, and uses page allocation functions (mmap on
*nix and VirtualAlloc on Windows). If you mean the GC functions, then
wouldn't your hooked malloc be called before mallocNoSync is called?
--
Best regards,
Vladimir mailto:vladimir at thecybershadow.net
More information about the Digitalmars-d
mailing list