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
Performance and Issues in Pipelining Throughput:  Throughput of a pipeline can be defined as the number of results that have been getting per unit time. It can be denoted as:

Instruction Pipelines As discussed previous, the stream of instructions in the instruction implementation cycle, can be realized through a pipeline where overlapped implementat

What are the 2 other types of Views, which are not allowed in Release 3.0? The two views are:- Structure Views. Entity Views.

Explain a macro Macro is a preprocessor directive, also called as macro definition takes the following general form:  #define identifier string

In a virtual memory system, the addresses used by the programmer refers to  (A) Memory space.               (B) Physical addresses.   (C) Address space.                (D) M

What are Multidimensional Arrays? Multidimensional array: Multidimensional arrays can be defined as "arrays of arrays". For example, a bidimensional array can be fictional as a

What are the critical capabilities for superior firm performance in e-commerce? Three firm capabilities which are critical for superior firm performance within e-commerce are:

Explain macro definition. A unit of specification for a program generation is termed as a macro. This consists of name, body of code and set of formal parameters.

Bubbling the Pipeline: Bubbling the pipeline (also known as a pipeline break or pipeline stall) is a technique for preventing, structural, data and branch hazards from taking p

Q. Concurrently read concurrently write? It is one of the models derived from PRAM. In this model the processors access the memory locations simultaneously for reading and writ