+ 14

Malloc function

What does this dangerous malloc function in C does? 😱 I am mush more confused! 😕

8th Jul 2019, 5:20 AM
Sarthak Pokhrel
Sarthak Pokhrel - avatar
3 Antworten
+ 7
Space {{#you_are_unique_just_like_others_are😂☺☺}} this give many information about malloc function It's called dangerous sometimes because there is an chance of leakage of the memory from the heap area when any variable allocated memory dynamically. and you have to be more careful regarding free the memory allocated to variable after usage else it might leak some information. https://www.sololearn.com/learn/C/2948/?ref=app https://www.sololearn.com/discuss/1751403/?ref=app https://www.sololearn.com/discuss/87168/?ref=app https://www.sololearn.com/discuss/1810986/?ref=app https://www.sololearn.com/discuss/1782424/?ref=app https://www.sololearn.com/discuss/1668712/?ref=app https://www.sololearn.com/discuss/1672054/?ref=app
8th Jul 2019, 5:30 AM
MsJ
MsJ - avatar
+ 5
If you had perfect knowledge of what your program does then it's not so dangerous, but no one is perfect.
8th Jul 2019, 5:59 AM
Sonic
Sonic - avatar
+ 4
Malloc allocates memory... and like what Mohit the coder (M.S.D) said you can over allocate particularly if used with an iteration
8th Jul 2019, 5:55 AM
Da2
Da2 - avatar