perfomance, malloc, HeapAlloc

  • Thread starter Thread starter Lloyd Dupont
  • Start date Start date
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
 
Lloyd said:
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
 
Back
Top