What is the difference between realloc() and free(), Computer Engineering

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.             

 

 

Posted Date: 4/8/2013 5:30:35 AM | Location : United States







Related Discussions:- What is the difference between realloc() and free(), Assignment Help, Ask Question on What is the difference between realloc() and free(), Get Answer, Expert's Help, What is the difference between realloc() and free() Discussions

Write discussion on What is the difference between realloc() and free()
Your posts are moderated
Related Questions
Fingerprint- Biometric computer security systems First of all, fingerprint is the most commonly used biometric technology, because every person has unique fingerprints and the

Assignment 3.b: Experiment with Neural Network Background: In this assignment, you will experiment with neural network for solving different types of practical problems. Y

Discuss in detail about Micro computer A microcomputer's CPU is a microprocessor. The microcomputer was originated in late 1970s. The first microcomputer was built around 8-bit

Differences between inter statement and intra statement delay? //define register variables reg a, b, c; //intra assignment delays initial begin a = 0; c = 0;

Why a function canot have delays? However in Open Vera, delays are allowed in function. A function returns a value and hence can be used as a part of any expression. This doesn

Multiprogramming or multitasking? Ans: The OS manages the concurrent execution of many application programs to make best possible use of computer resources. This pattern of si

Vector-Memory Instructions When vector operations with memory M are carried out then these are vector-memory instructions. These instructions are referred with the subsequent f

In binary counter the flip flop of lowest order position is complemented with each pulse. This means that JK input position must be maintained with logic one

What is centralized SPC, what are its modes of operation? In this centralized control, all the control equipment is replaced through a single processor that must be quite power

Perform multiplication with showing the contents of accumulator, B register and Y register during each step. (Accumulator, B, Y are 4-bit registers) B=06 Y=02