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
JMX is based on a 3-level architecture:   ? The Probe level have the probes (known as MBeans) instrumenting the resources. Also known as the Instrumentation level. ? The A

Which of the logic gates are known as universal gates ? Ans. NAND and NOR are termed as universal gates, since any digital circuit can be realized completely by using either of

Hard disk Architecture: A hard disk drive having the platters and motor hub removed indicating the copper colored stator coils surrounding a bearing at the cen

Why is C standard library needed?  C Standard Library: C would have been a tough programming language in absence of the standard library. The standard library in C contains

With the help of clocked JK flip flops and waveforms, explain the working of a three bit binary ripple counter. Write truth table for clock transitions. Ans. Three-Bit Binary Rip

What is the function of in network access layer in TCP/IP protocol stack? Function of Network Access Layer: The network access layer is the lowest layer within Internet

Discuss the applications of thermodynamics in field of energy technology Sol: Thermodynamics has wide applications as basis of thermal engineering. Nearly all process and engi

Q. Explain Indirect Cycle in control unit? Once an instruction is fetched the subsequent step is to fetch the operands. The instruction may have indirect and direct addressing

Handshake control of data transfer during an input operation:   . Handshake control of data transfer during an output operation o   Interface to CPU and Memory o

what is the use of d-flipflop in associative memory