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()

Define peripheral, Define peripheral. Devices that are under the direct...

Define peripheral. Devices that are under the direct control of computer are said to be linked online. These devices are intended to read information into or out of the memory

Mips simulator: testing, Your code will be tested using a command script. T...

Your code will be tested using a command script. The script is available on Blackboard in the archive MIPSimTest.zip. It contains a ReadMe file that explains how to run the script

What is binary, Binary is an alternative number system which works very goo...

Binary is an alternative number system which works very good for computers. Humans have ten fingers; that's probably why we use ten digits (0, 1, 2, 3, 4, 5, 6, 7, 8, and 9) in our

Applications of generic framework for electronic commerce, How are the appl...

How are the applications of generic framework for electronic commerce performed? To perform applications, this is essential to have Supporting Information and Organizational In

binary division program for signed integer, The program division.c is avai...

The program division.c is available for download as part of this assignment. It is a binary division program which works for signed integers. It contains a function, div32, which d

State and prove any one of the demorgen''s laws, Q. F(x,y,z) = ∑m (4,6,7,8...

Q. F(x,y,z) = ∑m (4,6,7,8)+ ∑d (2,5,11,12) Using K-Map. Q. State and prove any one of the DeMorgen's Laws. Show that these theorems can be extended up to any number of variabl

Show the dynamic range and colour depth, Q. Show the Dynamic Range and Colo...

Q. Show the Dynamic Range and Colour Depth? Dynamic Range is the number of colours a colour scan or number of grays a monochrome scanner can distinguish. The dynamic range is t

Determine octant to hexadecimal conversion, What is the Octant to hexadecim...

What is the Octant to hexadecimal conversion of 734 ? Ans. (734) 8      = (1 D C) 16 0001 ¦ 1101 ¦ 1100 1         D         C

Avantages of oopl in a programming language, Object oriented programming la...

Object oriented programming languages directly show the real life objects. The features of OOPL as inheritance, polymorphism, and encapsulation makes it strong.

Define looping in assembly language, Q. Define looping in assembly language...

Q. Define looping in assembly language? LOOPING  ; Program: Assume a constant inflation factor that is added to a series of prices ; stored in the memory. The program

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