equal
deleted
inserted
replaced
55 #include "runtime/stubRoutines.hpp" |
55 #include "runtime/stubRoutines.hpp" |
56 #include "runtime/thread.inline.hpp" |
56 #include "runtime/thread.inline.hpp" |
57 #include "runtime/threadCritical.hpp" |
57 #include "runtime/threadCritical.hpp" |
58 #include "runtime/timer.hpp" |
58 #include "runtime/timer.hpp" |
59 #include "services/attachListener.hpp" |
59 #include "services/attachListener.hpp" |
|
60 #include "services/memTracker.hpp" |
60 #include "services/runtimeService.hpp" |
61 #include "services/runtimeService.hpp" |
61 #include "utilities/decoder.hpp" |
62 #include "utilities/decoder.hpp" |
62 #include "utilities/defaultStream.hpp" |
63 #include "utilities/defaultStream.hpp" |
63 #include "utilities/events.hpp" |
64 #include "utilities/events.hpp" |
64 #include "utilities/growableArray.hpp" |
65 #include "utilities/growableArray.hpp" |
2273 warning(msg); |
2274 warning(msg); |
2274 } |
2275 } |
2275 return NULL; |
2276 return NULL; |
2276 } |
2277 } |
2277 |
2278 |
|
2279 // The memory is committed |
|
2280 address pc = CALLER_PC; |
|
2281 MemTracker::record_virtual_memory_reserve((address)addr, bytes, pc); |
|
2282 MemTracker::record_virtual_memory_commit((address)addr, bytes, pc); |
|
2283 |
2278 return addr; |
2284 return addr; |
2279 } |
2285 } |
2280 |
2286 |
2281 bool os::release_memory_special(char* base, size_t bytes) { |
2287 bool os::release_memory_special(char* base, size_t bytes) { |
2282 // detaching the SHM segment will also delete it, see reserve_memory_special() |
2288 // detaching the SHM segment will also delete it, see reserve_memory_special() |
2283 int rslt = shmdt(base); |
2289 int rslt = shmdt(base); |
2284 return rslt == 0; |
2290 if (rslt == 0) { |
|
2291 MemTracker::record_virtual_memory_uncommit((address)base, bytes); |
|
2292 MemTracker::record_virtual_memory_release((address)base, bytes); |
|
2293 return true; |
|
2294 } else { |
|
2295 return false; |
|
2296 } |
|
2297 |
2285 } |
2298 } |
2286 |
2299 |
2287 size_t os::large_page_size() { |
2300 size_t os::large_page_size() { |
2288 return _large_page_size; |
2301 return _large_page_size; |
2289 } |
2302 } |