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