Aptitude (12) C (2) C++ (10) CSS (1) Data Structure (2) English (7) General (14) HTML (3) Integration (1) Itinerary and Travel Cost (1) Java (29) JQ (5) JS (5) JSP (1) Lightning (14) logical (3) Math (1) Music Notation (17) MySql (4) Network (1) Regex (1) salesforce (131) Servlet (4) SF Admin (31) SF Dev (102) SQL (4) SQL_SERVER (1) StudyPoints (2) ytChannels (2) अन्ताक्षरी (4)

Mamory allocation n deallocation

As in C,malloc(allocates the specified number of bytes),calloc( allocates the specified number of bytes and initializes them to zero),realloc((Resize to the specified block of memory,if needed)  and free(releases the specified block of memory back to the system) are used for mamory allocation and deallocation.
In c++ and java  new operator is used to allocate memory,it atomatically take size of datatype which are going to be create,and initilize that with the help of constructor. For deallocating the memory deleate operator is used,it detroys the memory with the help of decunstructor.

No comments: