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
The Syntex used to call a screen as dialog box (pop up)is CALL SCREEN STARTING AT ENDING AT

what is the importance of chemistry for computer engineering?

A script kept information on potential subjects for an experiment in a vector of structures known as "subjects".  The following show an example of what the contents may be: >> subj

What is meant by inter process communication? Inter process Communication: The OS give the means for cooperating processes to communicate with each other through an inter pro

What is the purpose of zero (z) flag and carry (c) flag? Carry flag holds the carry after addition or the borrow after subtraction. Carry flag also indicates error conditions,

What is process control block?  Each process is shown in the OS by a process control block. It having many pieces of information associated with a specific process.

Define various security protocols used for e-commerce applications. The e-commerce systems of today are composed of very many components as like: a commerce server, client soft

What is a Shift Register? Ans:  Shift Register: A register wherein data finds shifted towards left or right while clock pulses are applied is termed as a Shift Register.

Question: 1. Distinguish between HTTP and True streaming, stating the advantages and disadvantages of both type of media streaming. 2. Name two online services which provi

Fundamental functional units of a computer: QUE. What are the fundamental functional units of a computer? Ans: A computer consists of 5 functionally independent major parts