Mercurial > hg > truffle
comparison src/os_cpu/linux_x86/vm/os_linux_x86.cpp @ 14300:d5b8799dfbd7
8032827: NMT: missing virtual memory tagging in os::workaround_expand_exec_shield_cs_limit()
Summary: Fixed missing virtual memory type tagging in os::workaround_expand_exec_shield_cs_limit() function
Reviewed-by: hseigel, coleenp
author | zgu |
---|---|
date | Tue, 28 Jan 2014 08:55:00 -0500 |
parents | de6a9e811145 |
children | d8041d695d19 |
comparison
equal
deleted
inserted
replaced
14295:4c241e42a3e4 | 14300:d5b8799dfbd7 |
---|---|
47 #include "runtime/osThread.hpp" | 47 #include "runtime/osThread.hpp" |
48 #include "runtime/sharedRuntime.hpp" | 48 #include "runtime/sharedRuntime.hpp" |
49 #include "runtime/stubRoutines.hpp" | 49 #include "runtime/stubRoutines.hpp" |
50 #include "runtime/thread.inline.hpp" | 50 #include "runtime/thread.inline.hpp" |
51 #include "runtime/timer.hpp" | 51 #include "runtime/timer.hpp" |
52 #include "services/memTracker.hpp" | |
52 #include "utilities/events.hpp" | 53 #include "utilities/events.hpp" |
53 #include "utilities/vmError.hpp" | 54 #include "utilities/vmError.hpp" |
54 | 55 |
55 // put OS-includes here | 56 // put OS-includes here |
56 # include <sys/types.h> | 57 # include <sys/types.h> |
904 ((StackYellowPages + StackRedPages + 1) * page_size)); | 905 ((StackYellowPages + StackRedPages + 1) * page_size)); |
905 char* codebuf = os::reserve_memory(page_size, hint); | 906 char* codebuf = os::reserve_memory(page_size, hint); |
906 if ( (codebuf == NULL) || (!os::commit_memory(codebuf, page_size, true)) ) { | 907 if ( (codebuf == NULL) || (!os::commit_memory(codebuf, page_size, true)) ) { |
907 return; // No matter, we tried, best effort. | 908 return; // No matter, we tried, best effort. |
908 } | 909 } |
910 | |
911 MemTracker::record_virtual_memory_type((address)codebuf, mtInternal); | |
912 | |
909 if (PrintMiscellaneous && (Verbose || WizardMode)) { | 913 if (PrintMiscellaneous && (Verbose || WizardMode)) { |
910 tty->print_cr("[CS limit NX emulation work-around, exec code at: %p]", codebuf); | 914 tty->print_cr("[CS limit NX emulation work-around, exec code at: %p]", codebuf); |
911 } | 915 } |
912 | 916 |
913 // Some code to exec: the 'ret' instruction | 917 // Some code to exec: the 'ret' instruction |