What is the difference between realloc() and free(), Computer Engineering

The free subroutine frees a block of memory lastly allocated by the malloc subroutine. Undefined results happen if the Pointer parameter is not a valid pointer. If the Pointer parameter is a null value, no action will happen. The realloc subroutine changes the size of the block of memory pointed to by the Pointer parameter to the number of bytes specified by the Size parameter and returns a new pointer to the block. The pointer specified by the Pointer parameter must have been formed with the malloc, calloc, or realloc subroutines and not been deallocated with the free or realloc subroutines. Undefined results happen if the Pointer parameter is not a valid pointer.             

 

 

Posted Date: 4/8/2013 5:30:35 AM | Location : United States







Related Discussions:- What is the difference between realloc() and free(), Assignment Help, Ask Question on What is the difference between realloc() and free(), Get Answer, Expert's Help, What is the difference between realloc() and free() Discussions

Write discussion on What is the difference between realloc() and free()
Your posts are moderated
Related Questions
Define micro routine and microinstruction. A sequence of control words corresponding to the control sequence of a machine instruction represents the micro routine for that ins

Q. What is the Future of Hyper threading? Current Pentium 4 based MPUs employ Hyper-threading however next-generation cores, Conroe, Merom and Woodcrest will not. As some have

How Race Around Condition can be avoided? Ans: The race around condition can be avoided if 1. Duration of clock pulse being high is small like comparative to the dela

pls give the list of adaptive mechanism in artificial immune system

Differentiate between non-relocatable self relocatable programs. A non-relocatable program is one which cannot be executed in any memory area other than the area starting at

Higher Order Predicate Logic : In the very first order predicate logic, we are only allowed to quantify over objects. If we are considered to allow ourselves to quantify over

Q. How to Create a Layout Table in dreamweaver? In last section you used cells to create a table. Now, you will see how to start with a table and add cells later. 1.  In Obj

the c code for hypothetical reliable data transfer protocol

Explain the action of an interrupt processing routine? Action of an interrupt processing routine is as follows : 1. Save contents of registers of CPU. This action is not e

What is the decimal equivalent of hex number 1A53 ? Ans. 6739 is the decimal equivalent of Hex Number 1A53. From Hex Number to Decimal Number conversion is shown below: 1