GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Programming  >  C

 Print  |  
Question:  Reallocating memory

Answer: When reallocating memory if any other pointers point into same piece of memory do you have to readjust these pointers or do they get readjusted automatically?


June 06, 2009 03:43:45 #2
 alokag   Member Since: June 2009    Total Comments: 5 

RE: Reallocating memory
 
While reallocating, there is no readjustments. The OS will just search for the required memory block(not in use) & if available pass its pointer to the user.

Nb: It CAN be the same pointer you have before reallocation.
     

 

Back To Question