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
What happens if the both source and destination are named the same? Ans) The import operation present in MS Access does not overwrite or change any of the existing tables or obj

Q. Program for interchanging the values of two Memory locations? Program for interchanging the values of two Memory locations  ; input: Two memory variables of same size:

Define Time Sharing. Time Sharing: Sharing of a computing resource among various users by means of multiprogramming and multi-tasking is termed as timesharing. By permittin

Q Explain Instruction cycle and Execution cycle. and also explain Instruction Counter, Memory Address Register and Memory Buffer Register.

Rounding off of values can be carried out using the write statement. Yes, Rounding off value can be out by using the write statement.

How to develop an object model To develop an object model firstly identify classes and their associations, as they affect overall problem structure and approach. Then prepare

Q. How do you classify the neutrons in terms of its kinetic energy? Neutrons are classified as-per to their kinetic energy as (a) Slow neutrons as well as (b) fast neutrons.

Minimize the following logic function using K-maps and realize using NAND and NOR gates. F(A,B,C,D) =?_m(1,3,5,8,9,11,15) + d(2,13).

Suppose you''re given n numbers and asked to find a number that is greater than or equal to the median a) What is the lower bound for the worst case complexity of this problem?

Q. Describe THEAD, TBODY and TFOOT tag? THEAD, TBODY, TFOOT , , and form groups of rows. specifies that a group of rows are heade