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

Design a sample counter, Let's design a synchronous BCD counter. A BCD coun...

Let's design a synchronous BCD counter. A BCD counter follows a sequence of ten states and returns to 0 after count of 9. These counters are also known as decade counters. This typ

Draw the logic circuit using NOR gates using K-map, Draw the logic circuit ...

Draw the logic circuit using minimizaed equation by K-map for the simplified function using NOR gates only. F (A, B, C, D) = Π M (1, 2, 3, 8, 9, 10, 11,14) ⋅ d (7, 15) Ans

Units of artificial neural networks, Units of artificial neural networks: ...

Units of artificial neural networks: However the input units simply output the value that was input to them from the example to be propagated. So every other unit in a network

Describe about the embedded applications assembly, Describe about the Embed...

Describe about the Embedded applications assembly Embedded applications assembly and C programs are developed since embedded programs aren't large. For all others high-level an

Characteristics of decision support system, Q. Characteristics of decision ...

Q. Characteristics of decision support system? Characteristics of DSS- The qualities of the DSS are as follows: - 1. DSS focus on towards providing assistance in analyzing s

Mechanisms for pick and place industrial robots - robotics, Each group is r...

Each group is required to complete a group assignment on the analysis, modelling and classification of one of the following classes of mechanisms encountered in robotics and indust

What is functional modelling, What is  Functional Modelling  We know ...

What is  Functional Modelling  We know that Data flow modelling is an ordinary technique used for analysis of a problem in software engineering. It is very useful for analyzi

Show the simple arithmetic application, Q. Show the Simple Arithmetic Appli...

Q. Show the Simple Arithmetic Application? The question is why can't we simply employ XCHG instruction with 2 memory variables as operand? To answer the question let's look int

Higher order predicate logic - artificial intelligence, Higher Order Predic...

Higher Order Predicate Logic: In first order predicate logic, we are allowed to quantify over objects only. If we let  ourselves  to  quantify  over  predicate  or  function  s

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