is there any performance difference between malloc() & HeapMalloc()?
David Lowndes - 21 Oct 2005 07:53 GMT
>is there any performance difference between malloc() & HeapMalloc()?
It depends on the implementation of malloc.
Generally malloc is an allocation mechanism on top of HeapAlloc that
provides optimisation by allocating a single large block and
sub-dividing it down more optimally than HeapAlloc. Additionally, a
debug malloc implementation may provide leak detection diagnostic
features.
Dave

Signature
MVP VC++ FAQ: http://www.mvps.org/vcfaq
Tom Widmer [VC++ MVP] - 21 Oct 2005 13:17 GMT
> is there any performance difference between malloc() & HeapMalloc()?
In recent versions of VC, in the release version CRT, malloc delegates
almost directly to HeapAlloc, so the performance difference is negligable.
Tom