Article From:https://www.cnblogs.com/hello-dummy/p/9217041.html

The main functions of dynamic memory allocation are:

malloc(),  realloc(), calloc() Are included in the header file #include < stdlib.h&gt

The definition of these functions:

void *__cdecl malloc(size_t _Size); // Return is the first address of the memory

void *__cdecl realloc(void *_Memory,size_t _NewSize); // Generally used for dynamic allocation of memory to increase memory, rarely used to reduce. Return is also an address.

 void *__cdecl calloc(size_t _NumOfElements,size_t _SizeOfElements);

 

Still learning…

Link of this Article: C dynamically allocated memory

Leave a Reply

Your email address will not be published. Required fields are marked *