Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/os.hpp @ 22973:340ca8812af9
8067469: G1 ignores AlwaysPreTouch
Summary: Factor out pretouch code of the various virtual space management classes and use them everywhere including in G1.
Reviewed-by: stefank, ehelin, dholmes
author | tschatzl |
---|---|
date | Thu, 18 Dec 2014 09:37:02 +0100 |
parents | 8461d0b03127 |
children | c2ce24504334 |
comparison
equal
deleted
inserted
replaced
22972:41a855ff6305 | 22973:340ca8812af9 |
---|---|
316 static void commit_memory_or_exit(char* addr, size_t size, | 316 static void commit_memory_or_exit(char* addr, size_t size, |
317 size_t alignment_hint, | 317 size_t alignment_hint, |
318 bool executable, const char* mesg); | 318 bool executable, const char* mesg); |
319 static bool uncommit_memory(char* addr, size_t bytes); | 319 static bool uncommit_memory(char* addr, size_t bytes); |
320 static bool release_memory(char* addr, size_t bytes); | 320 static bool release_memory(char* addr, size_t bytes); |
321 | |
322 // Touch memory pages that cover the memory range from start to end (exclusive) | |
323 // to make the OS back the memory range with actual memory. | |
324 // Current implementation may not touch the last page if unaligned addresses | |
325 // are passed. | |
326 static void pretouch_memory(char* start, char* end); | |
321 | 327 |
322 enum ProtType { MEM_PROT_NONE, MEM_PROT_READ, MEM_PROT_RW, MEM_PROT_RWX }; | 328 enum ProtType { MEM_PROT_NONE, MEM_PROT_READ, MEM_PROT_RW, MEM_PROT_RWX }; |
323 static bool protect_memory(char* addr, size_t bytes, ProtType prot, | 329 static bool protect_memory(char* addr, size_t bytes, ProtType prot, |
324 bool is_committed = true); | 330 bool is_committed = true); |
325 | 331 |