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

Explain the high level Language - computer programming, Explain the High Le...

Explain the High Level Language? The programming language such as FORTRAN, C, or Pascal that enables a programmer to write programs those are more or less independent of a parti

Write the game using writing functions, The year is 2199. For many generati...

The year is 2199. For many generations, the robotic Cyleth have faithfully served humanity. However, under the direction of the computerized superintelligence Skyweb, they have tur

Artificial life - artificial intelligence, Artificial Life - artificial int...

Artificial Life - artificial intelligence: Give birth to new exits forms.  A swot of Artificial Life will certainly direct on what it means for a complex system to be 'aliv

Control section in computer system, CONTROL SECTION: The control sectio...

CONTROL SECTION: The control section directs the flow of traffic (operations) and data. Also it maintains order within the computer. The control section chooses one program sta

Determine frequency of a dtmf phone, In a DTMF phone a dialling of 8 genera...

In a DTMF phone a dialling of 8 generates (A) 1336 Hz- 770 Hz                      (B)  1209 Hz - 1477 Hz (C)  1209 Hz- 941 Hz                     (D)  1336 Hz-852 Hz

Differences between batch systems versus real-time systems, Question 1: ...

Question 1: a. Give NINE general properties of an MIS b. Name and explain the THREE main Problems and Issues of EIS Question 2: a. What are information systems for?

Artificial neural networks, Artificial Neural Networks: However imagin...

Artificial Neural Networks: However imagine now in this example as the inputs to our function were arrays of pixels and there actually taken from photographs of vehicles such

Explain about wildcard character in dos, Q. Explain about wildcard characte...

Q. Explain about wildcard character in DOS? Sometimes you may like to list files having similar names. Let as suppose that these files are present in a root directory of drive

What is parallel sections construct, What is Parallel Sections Construct? ...

What is Parallel Sections Construct? The parallel sections construct is a shortcut for specifying a parallel construct comprising one sections construct however no other statem

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