title: Inside Dynamics memory management
body: <p>i am student and want to know more about the dynamics memory management. For C++, calling operator new() can allocate a memory block under the Heap(Free Store ). In fact, I have not a full picture how to achieve it.</p>
  
  <p>There are a few questions:
  1) What is the mechanism that the OS can allocate a memory block?? As I know, there are some basic memory allocation schemes like first-fit, best-fit and worst-fit. Does OS use one of them to allocate memory dynamically under the heap?</p>
  
  <p>2) For different platform like Android, IOS, Window and so on, are they used different memory allocation algorithms to allocate a memory block?</p>
  
  <p>3) For C++, when i call operator new() or malloc(), Does the memory allocator allocate a memory block randomly in the heap?</p>
  
  <p>Hope anyone can help me.</p>
  
  <p>Thanks</p>