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
Signify this problem by means of: i.    An Entity Relationship model; ii.    Relational tables. Pete's Programmers is a firm which supplies part time staff on contract to organisat

What is a Priority Interrupt? Ans: A priority interrupt is a type of interrupt that establishes a priority over the many sources to determine which condition is to be serviced

Stack pointer is a particular purpose 16-bit register in the Microprocessor, which grasp the address of the top of the stack.

What is ROM? Read only memory [ROM] is used for storing programs that are permanently resident in the computer and for tables of constants that do not change in value as the pr

distributed & centralized system in computer network

Illustrate 16-bit ISA?  Compare it with 8-bit ISA bus.  The only difference between 8 and 16-bit ISA bus is that an extra connector is attached behind the 8-bit connector. 16-b


design a gray to bcd code converter using 16:1 de multiplexe

What are the Counters? 1. The Counter is a sequential circuit which consists of a set of flip flops connected in a appropriate manner to count the sequence of input pulses.

Explain the differences between macros and subroutines. Macros Vs Subroutines (i) Macros are pre-processor directives which are processed before the source program is pass