![]() ![]() malloc has a return value of interest you should always check the return value. And by the way., kids don't try this at home. Stack memory allocation is considered safer as compared to heap memory allocation because the data stored can only be accessed by the owner thread.the malloc'ed buffer space is on the heap. Definitely the first one If you want something to live after the stack frame expires you should heap allocate it. The static keyword tells you that it's not to be allocated on the stack. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |