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

Cohesion assignments, what can be different assignments given on this topic...

what can be different assignments given on this topic?

Give the solutions for critical section problem, Give the solutions for cri...

Give the solutions for critical section problem? A solution to the critical section problem must specify the subsequent requirements. (a) Mutual exclusion (b) Progress (c)

Define about the objects, Define about the Objects The object notation...

Define about the Objects The object notation is the same in basic form as that for a class. There are three differences among the notations, these are given below: With

What is e-cash, E-Cash:  E-cash is cash shown by two models. One is the...

E-Cash:  E-cash is cash shown by two models. One is the on-line form of e-cash (introduced by DigiCash) which permits for the completion of all types of internet transactions.

Describe about address space and memory space, Q. Describe about Address Sp...

Q. Describe about Address Space and Memory Space? An address used by a programmer will be termed as a virtual address and set of such addresses the address space. An address in

What is a mutable member, One that can be modified by the class even when t...

One that can be modified by the class even when the object of the class or the member function doing the modification is const.

Explain the transport layer in detail, Explain the transport layer in detai...

Explain the transport layer in detail. Transport Layer: The transport layer controls and makes sure the end-to-end integrity of the data message propagated by the network am

Define static memories, Define static memories? Memories that consists ...

Define static memories? Memories that consists of circuits capable of retaining their state as long as power is applied is known as static memories

What are benefits to businesses by e-commerce over extranets, What are adva...

What are advantages and benefits to businesses by e-commerce over extranets? The advantages and benefits to businesses comprise: Less Paperwork: along with documents and bus

Customer service and support in post purchase interaction, Describe the cus...

Describe the customer service and support in post purchase Interaction. Post purchase Interaction: The considerations at this step can be explained by the given example:

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