What is the difference between realloc() and free(), Computer Engineering

Assignment Help:

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.             

 

 


Related Discussions:- What is the difference between realloc() and free()

What are the elements of analysis model, What are the elements of Analysis ...

What are the elements of Analysis model? i. Data Dictionary ii. Entity Relationship Diagram iii. Data Flow Diagram iv. State Transition Diagram v. Control Specifica

Pythagorean theorem, if the 6 is a and the b is 3 what is the c ?

if the 6 is a and the b is 3 what is the c ?

Subsequent statements set every element of matrix, Q. Subsequent statements...

Q. Subsequent statements set every element of matrix? Let a= [2,4,6,8,10], b=[1,3,5,7,9], c=[0,0,0,0,0] Consider the subsequent program section FORALL (i = 2:4)   a(i)

Sorting algorithms, Two way merge sort for 84,83,78,90,23,123,98,159,8,200

Two way merge sort for 84,83,78,90,23,123,98,159,8,200

How do you populate data into a multiple line field, How do you populate da...

How do you populate data into a multiple line field? To populate data into a multiple line field, an index is added to the field name to show which line is to be populated by t

How to fix an asic-based design from easiest to most extreme, How to fix an...

How to fix an ASIC-based design from easiest to most extreme? There are different ways to fix an ASIC-based design as given below: Initially, assume some reviews fundamentally.

What is pure semiconductors, Q. What is Pure semiconductors? Pure semic...

Q. What is Pure semiconductors? Pure semiconductors, known as intrinsic semiconductors, have very few charge carriers and may hence be classified as almost insulators or very p

What is boyce codd normal form, A relation schema R is in BCNF with respect...

A relation schema R is in BCNF with respect to a set F of functional dependencies if for all functional dependencies in F+ of the form a->b, where a and b is a subset of R, at leas

Evaluate 23 - 48 using the 2's complement method, Perform the 23 - 48 opera...

Perform the 23 - 48 operations using the 2's complement method. Ans. Given 23 - 48 firstly add them       23                         0 1 0 1 1 1 - (- 48)                     +

Explain the boolean equations for logic circuits, Explain The Boolean Equat...

Explain The Boolean Equations for Logic Circuits? A Boolean equation is the mathematical representation of a logic circuit using standard Boolean terms. All the logic gates (AND,

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd