src/os/bsd/vm/perfMemory_bsd.cpp

changeset 4193
716c64bda5ba
parent 4153
b9a9ed0f8eeb
child 4893
4b7cf00ccb08
     1.1 --- a/src/os/bsd/vm/perfMemory_bsd.cpp	Thu Oct 18 13:09:47 2012 -0400
     1.2 +++ b/src/os/bsd/vm/perfMemory_bsd.cpp	Fri Oct 19 21:40:07 2012 -0400
     1.3 @@ -30,6 +30,7 @@
     1.4  #include "os_bsd.inline.hpp"
     1.5  #include "runtime/handles.inline.hpp"
     1.6  #include "runtime/perfMemory.hpp"
     1.7 +#include "services/memTracker.hpp"
     1.8  #include "utilities/exceptions.hpp"
     1.9  
    1.10  // put OS-includes here
    1.11 @@ -753,6 +754,10 @@
    1.12    // clear the shared memory region
    1.13    (void)::memset((void*) mapAddress, 0, size);
    1.14  
    1.15 +  // it does not go through os api, the operation has to record from here
    1.16 +  MemTracker::record_virtual_memory_reserve((address)mapAddress, size, CURRENT_PC);
    1.17 +  MemTracker::record_virtual_memory_type((address)mapAddress, mtInternal);
    1.18 +
    1.19    return mapAddress;
    1.20  }
    1.21  
    1.22 @@ -912,6 +917,10 @@
    1.23                "Could not map PerfMemory");
    1.24    }
    1.25  
    1.26 +  // it does not go through os api, the operation has to record from here
    1.27 +  MemTracker::record_virtual_memory_reserve((address)mapAddress, size, CURRENT_PC);
    1.28 +  MemTracker::record_virtual_memory_type((address)mapAddress, mtInternal);
    1.29 +
    1.30    *addr = mapAddress;
    1.31    *sizep = size;
    1.32  

mercurial