What is the difference between _mem_alloc() and _mem_alloc_zero()?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

What is the difference between _mem_alloc() and _mem_alloc_zero()?

Jump to solution
655 Views
parkjaeyeon
Contributor I

Hello.

I use K60 MCU with MQX.

I wonder what is the difference between _mem_alloc() and _mem_alloc_zero()..

Ask for answers.

Thanks.

Have a good day~.

0 Kudos
1 Solution
420 Views
stevejanisch
Contributor IV

The zero function fills the allocated space with zeros... akin to doing a memset.  Without it you get the space but it isn't initialized.

View solution in original post

0 Kudos
1 Reply
421 Views
stevejanisch
Contributor IV

The zero function fills the allocated space with zeros... akin to doing a memset.  Without it you get the space but it isn't initialized.

0 Kudos