--- a/hotspot/src/os/windows/vm/perfMemory_windows.cpp Thu Oct 18 13:09:47 2012 -0400
+++ b/hotspot/src/os/windows/vm/perfMemory_windows.cpp Fri Oct 19 21:40:07 2012 -0400
@@ -30,6 +30,7 @@
#include "os_windows.inline.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/perfMemory.hpp"
+#include "services/memTracker.hpp"
#include "utilities/exceptions.hpp"
#include <windows.h>
@@ -1496,6 +1497,10 @@
// clear the shared memory region
(void)memset(mapAddress, '\0', size);
+ // it does not go through os api, the operation has to record from here
+ MemTracker::record_virtual_memory_reserve((address)mapAddress, size, CURRENT_PC);
+ MemTracker::record_virtual_memory_type((address)mapAddress, mtInternal);
+
return (char*) mapAddress;
}
@@ -1672,6 +1677,11 @@
"Could not map PerfMemory");
}
+ // it does not go through os api, the operation has to record from here
+ MemTracker::record_virtual_memory_reserve((address)mapAddress, size, CURRENT_PC);
+ MemTracker::record_virtual_memory_type((address)mapAddress, mtInternal);
+
+
*addrp = (char*)mapAddress;
*sizep = size;
@@ -1824,6 +1834,8 @@
}
remove_file_mapping(addr);
+ // it does not go through os api, the operation has to record from here
+ MemTracker::record_virtual_memory_release((address)addr, bytes);
}
char* PerfMemory::backing_store_filename() {