   C++,  C++Builder, API Windows________________895

 TotalAddrSpace, TotalUncommitted  TotalCommitted   -
,    .   TotalAllocated  TotalFree
      (  
    heap).      -
      TotalAllocated  TotalFree.

 SetMemoryManager    ,
   ,  .   -
    MemMgr  TMemoryManage. 
 TMemoryManage  :

GetMem       ,      
  Size     
 (  malloc).  Size  GetMem
    .  GetMem   
  ,    NULL

FreeMem      ,   ,  -
    (  free). 
 FreeMem     NULL.  FreeMem
  ,    0.  -
     

ReallocMem   ,    ,  -
   ,     Size
(  realloc). ,   
ReallocMem,     NULL,   Size 
   0.  ReallocMem  
 ,       ,
       . -
,    ,   -
,       -
.        NULL,
    

 ,    SetMemoryMa-
nager,    ,    , -
  ..  GetMemoryManager    TMemory-
Manager,     .   
     .

 .         
        -
 .     :

ttinclude <malloc.h>

TMemoryManager* mmNew;

TMemoryManager* mmOld;

long alloc, dealloc, Nalloc, Ndealloc;

void*   fastcall NewGetMem(int Size)
{

alloc += Size;

Nalloc++;

return mm01d->GetMem(Size);