Mercurial > hg > truffle
diff src/os/solaris/vm/os_solaris.cpp @ 8744:15401203db6b
Merge
author | stefank |
---|---|
date | Fri, 15 Mar 2013 08:57:55 +0100 |
parents | ca9580859cf4 6b803ba47588 |
children | 754c24457b20 17bf4d428955 |
line wrap: on
line diff
--- a/src/os/solaris/vm/os_solaris.cpp Tue Mar 12 11:00:49 2013 -0700 +++ b/src/os/solaris/vm/os_solaris.cpp Fri Mar 15 08:57:55 2013 +0100 @@ -3420,13 +3420,25 @@ if ((retAddr != NULL) && UseNUMAInterleaving) { numa_make_global(retAddr, size); } + + // The memory is committed + address pc = CALLER_PC; + MemTracker::record_virtual_memory_reserve((address)retAddr, size, pc); + MemTracker::record_virtual_memory_commit((address)retAddr, size, pc); + return retAddr; } bool os::release_memory_special(char* base, size_t bytes) { // detaching the SHM segment will also delete it, see reserve_memory_special() int rslt = shmdt(base); - return rslt == 0; + if (rslt == 0) { + MemTracker::record_virtual_memory_uncommit((address)base, bytes); + MemTracker::record_virtual_memory_release((address)base, bytes); + return true; + } else { + return false; + } } size_t os::large_page_size() {