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
Is it possible to extract data from tables without using the event 'GET' in the report with an appropriate LDB. False.   You can extract data from tables using Select stateme

Q. How to export a dreamweaver document as xml file? Step 1: Choose File -> Open, Step 2: Select document which uses a template (and has editable regions) Step 3: Click O

Consider the following system snapshot using data structures in the Banker's algorithm, with resources A, B, C, and D, and process P0 to P4:                           Max

What are the Digital certificates of hardware computations Digital certificates are highly dependent on hardware computations, it is essential that mechanisms are evolved to i

How can a parent and child process communicate? A parent and child can communicate by any of the normal inter-process communication schemes (pipes, sockets, message queues, sha

What are the uses of Router? Router: A router is used to transfer or route data among two or more similar networks. This determines the next network point to that a data

Ask qa survey was conducted among the residents of pune city,it suburbs and the pune cantonment area.the following three pie diagrams show their respective preferences for living i

The larger the Grade of Service, the worse is the service given, it is true or false. Ans: It is true that larger the Grade of Service, the worse service is provided.

Explain Time Switching. Time Switches: The principle of a time switch is demonstrated in figure. This connects an incoming n channel PCM highway to an outgoing n channel PC

What is the LINQ file extension that interacts with Code Behinds objects? Ans) The extension of the file is .dbml