malloc, which allocates a specified number of bytes of memory. The initial value of the memory is indeterminate.
calloc, which allocates space for a specified number of objects of a specified size. The space is initialized to all 0 bits.
realloc, which increases or decreases the size of a previously allocated area. When the size increases, it may involve moving the previously allocated area somewhere else, to provide the additional room at the end. Also, when the size increases, the initial value of the space between the old contents and the end of the new area is indet...
- 7. Process Environment
- from Advanced Programming in the UNIX® Environment, Third Edition
- Publisher: Addison-Wesley Professional
- Released: May 2013
What is the difference among the three allocation operations?
Share this highlighthttp://www.safaribooksonline.com/a/advanced-programming-in/18988099/