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
Q. Explain Memory Write operation? Memory write operation transfers content of a data register to a memory word M selected by the address. Presume that data of register R1 is t

Connectives - first-order logic: We can string predicates all together in a sentence by using connectives into the same way to conduct that we did for propositional logic. We

JavaBeans are reusable software components written in the Java programming language, designed to be influenced visually by a software development environment, like JBuilder or Visu

SQL Injection includes entering SQL code into web forms, eg. login fields, or into the browser address field, to access and manipulate the database across the site, application or

Give the truth table of S-R and D-flipflops. Ans: The Truth Table for S-R Flip-Flop is illustrated in Fig.(a) and truth table of D Flip-Flop is illustrated in Fig.(b)

Define interrupt and ISR? An interrupt is a request from an I/O device for service by the processor. The processor gives the requested service by implementing the interrupt ser

Resolution Method: For a minor miracle occurred in 1965 where Alan Robinson published his resolution method as uses a method to generalised version of the resolution rule of i

The Boolean expression A‾.B + A.B‾ + A.B is equivalent to ? Ans. The Boolean expression A‾ .B + A. B‾+ A.B is equivalent to A + B (A‾ .B + A. B‾+ A.B = B( A‾ + A) + A. B‾ =

What is CLR?  CLR(Common Language Runtime) is the major resource of .Net Framework. It is collection of services like garbage collector, exception handler, jit compilers etc. w

What are the advantages of Hierarchical Networks? Hierarchical networks are able of handling heavy traffic where needed, and at similar time use minimal number of trunk groups