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

Functional units of a computer system, Functional units of a computer syste...

Functional units of a computer system: Digital computer systems consist of 3 distinct units. These units are as follows:  Central Processing unit Input unit and Output unit.

Explain busy hour calling rate in telephone traffic, With reference to tele...

With reference to telephone traffic, explain the terms BHCR. BHCR: Busy hour calling rate is explained as the average number of calls originated through a subscriber througho

Explain use of parallel sections construct, Q. Explain use of parallel sect...

Q. Explain use of parallel sections construct? This illustration explains use of parallel sections construct. Three functions, fun1, fun2, and fun3, all can be executed simulta

What are the largest UDP messages, What are the largest UDP messages that c...

What are the largest UDP messages that can fit into single Ethernet frame? UDP utilizes IP for delivery. As ICMP UDP packet is encapsulated in IP datagram. Therefore entire UDP

Explain switching system of a finite state machine model, Show how finite s...

Show how finite state machine model helps in designing a switching system and give a typical example. Switching system fundamentally belongs to the class of finite state machi

What are the types of assemblies, What are the Types of Assemblies? One...

What are the Types of Assemblies? One of the drawback of using Visual Studio.NET and the .NET framework to develop applications has been the lack of cross-platform support. As

Loop level-levels of parallel processing, Loop Level At this level, rep...

Loop Level At this level, repeated loop iterations are the applicants for parallel execution. However, data dependencies among subsequent iterations may limit parallel executio

Define hypertext verses hypermedia briefly, Define Hypertext verses Hyperme...

Define Hypertext verses Hypermedia briefly. Hypertext is fundamentally the same as regular text- this can be stored, read, searched or edited along with a significant exception

What is the size limitation of an access database, Size limitation does not...

Size limitation does not relate to number of records in a table within a database. Forms, reports, macros, and modules also add to database size, but is rather minimal compared to

Show the spawned program, Q. Show the spawned program? include "pvm3.h"...

Q. Show the spawned program? include "pvm3.h"  main() {    int ptid, msgtag;    char buf[100];    ptid = pvm_parent();    strcpy(buf, "hello, world from ");

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