Daer,
AclrtMallocHost is optimized. The pin operation is performed in advance to facilitate subsequent DMA operations. However, when malloc is applied for, only an address is allocated in advance. When the malloc is used, space is allocated in the heap and then DMA is performed.
Thank you.