Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How does free() know how many bytes to free?

Answer Posted / vrushali

Whenever we call malloc() for allocating memory. The value
of the starting address is stored in a virtual memory tables.
So whenever free() is called then using the starting memory
location free () will have an entry of the bytes allocated
and to be freed. It can do it using this entry then entry is
deleted also.
This is pure OS concept.

Please reply here if you are not able to understand my answer.

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what will be the outcome of the following conditional statement if the value of variable s is 10?

1235


What is a void * in c?

1061


What are the standard predefined macros?

1126


How can I prevent another program from modifying part of a file that I am modifying?

1033


What's the best way of making my program efficient?

1084


Explain how can I read and write comma-delimited text?

1154


write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.

1978


What are the similarities between c and c++?

1059


What is default value of global variable in c?

970


Ow can I insert or delete a line (or record) in the middle of a file?

986


Why we use break in c?

989


what is recursion in C

1056


Is main is user defined function?

1128


write a program to display all prime numbers

1950


1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.

2141