Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By Dani
#9150 Hello, my name is Daniel and I'm new here. I started programming the ESP8266 with the SDK a few weeks ago and now I'm at the point where I need dynamic memory. I found out, that there are four functions to manage dynamic memory:
os_malloc
os_realloc
os_zalloc
os_free

malloc, realloc and free are clear, but what is zalloc for?

Thanks and best regards,
Dani :-)
Last edited by Dani on Sat Feb 07, 2015 4:40 am, edited 1 time in total.
User avatar
By jcmvbkbc
#9161
Dani wrote:malloc, realloc and free are clear, but what is zalloc for?

zalloc == malloc + zeroize allocated memory.
User avatar
By jcmvbkbc
#9168
Dani wrote:So it's the same as calloc?

It does similar thing, but it has different signature: void *os_zalloc(size_t).