< prev index next >

src/share/vm/runtime/os.hpp

Print this page
rev 7280 : 8064457: Introduce compressed oops mode "disjoint base" and improve compressed heap handling.


 280   // Methods for tracing page sizes returned by the above method; enabled by
 281   // TracePageSizes.  The region_{min,max}_size parameters should be the values
 282   // passed to page_size_for_region() and page_size should be the result of that
 283   // call.  The (optional) base and size parameters should come from the
 284   // ReservedSpace base() and size() methods.
 285   static void trace_page_sizes(const char* str, const size_t* page_sizes,
 286                                int count) PRODUCT_RETURN;
 287   static void trace_page_sizes(const char* str, const size_t region_min_size,
 288                                const size_t region_max_size,
 289                                const size_t page_size,
 290                                const char* base = NULL,
 291                                const size_t size = 0) PRODUCT_RETURN;
 292 
 293   static int    vm_allocation_granularity();
 294   static char*  reserve_memory(size_t bytes, char* addr = 0,
 295                                size_t alignment_hint = 0);
 296   static char*  reserve_memory(size_t bytes, char* addr,
 297                                size_t alignment_hint, MEMFLAGS flags);
 298   static char*  reserve_memory_aligned(size_t size, size_t alignment);
 299   static char*  attempt_reserve_memory_at(size_t bytes, char* addr);




 300   static void   split_reserved_memory(char *base, size_t size,
 301                                       size_t split, bool realloc);
 302   static bool   commit_memory(char* addr, size_t bytes, bool executable);
 303   static bool   commit_memory(char* addr, size_t size, size_t alignment_hint,
 304                               bool executable);
 305   // Same as commit_memory() that either succeeds or calls
 306   // vm_exit_out_of_memory() with the specified mesg.
 307   static void   commit_memory_or_exit(char* addr, size_t bytes,
 308                                       bool executable, const char* mesg);
 309   static void   commit_memory_or_exit(char* addr, size_t size,
 310                                       size_t alignment_hint,
 311                                       bool executable, const char* mesg);
 312   static bool   uncommit_memory(char* addr, size_t bytes);
 313   static bool   release_memory(char* addr, size_t bytes);
 314 
 315   enum ProtType { MEM_PROT_NONE, MEM_PROT_READ, MEM_PROT_RW, MEM_PROT_RWX };
 316   static bool   protect_memory(char* addr, size_t bytes, ProtType prot,
 317                                bool is_committed = true);
 318 
 319   static bool   guard_memory(char* addr, size_t bytes);




 280   // Methods for tracing page sizes returned by the above method; enabled by
 281   // TracePageSizes.  The region_{min,max}_size parameters should be the values
 282   // passed to page_size_for_region() and page_size should be the result of that
 283   // call.  The (optional) base and size parameters should come from the
 284   // ReservedSpace base() and size() methods.
 285   static void trace_page_sizes(const char* str, const size_t* page_sizes,
 286                                int count) PRODUCT_RETURN;
 287   static void trace_page_sizes(const char* str, const size_t region_min_size,
 288                                const size_t region_max_size,
 289                                const size_t page_size,
 290                                const char* base = NULL,
 291                                const size_t size = 0) PRODUCT_RETURN;
 292 
 293   static int    vm_allocation_granularity();
 294   static char*  reserve_memory(size_t bytes, char* addr = 0,
 295                                size_t alignment_hint = 0);
 296   static char*  reserve_memory(size_t bytes, char* addr,
 297                                size_t alignment_hint, MEMFLAGS flags);
 298   static char*  reserve_memory_aligned(size_t size, size_t alignment);
 299   static char*  attempt_reserve_memory_at(size_t bytes, char* addr);
 300   static char*  attempt_reserve_memory_at_multiple(size_t bytes, char* addr[]);
 301   static char*  attempt_reserve_memory_in_range(size_t size, size_t alignment,
 302                                                 char* range_from, char* range_to,
 303                                                 int num_attempts);
 304   static void   split_reserved_memory(char *base, size_t size,
 305                                       size_t split, bool realloc);
 306   static bool   commit_memory(char* addr, size_t bytes, bool executable);
 307   static bool   commit_memory(char* addr, size_t size, size_t alignment_hint,
 308                               bool executable);
 309   // Same as commit_memory() that either succeeds or calls
 310   // vm_exit_out_of_memory() with the specified mesg.
 311   static void   commit_memory_or_exit(char* addr, size_t bytes,
 312                                       bool executable, const char* mesg);
 313   static void   commit_memory_or_exit(char* addr, size_t size,
 314                                       size_t alignment_hint,
 315                                       bool executable, const char* mesg);
 316   static bool   uncommit_memory(char* addr, size_t bytes);
 317   static bool   release_memory(char* addr, size_t bytes);
 318 
 319   enum ProtType { MEM_PROT_NONE, MEM_PROT_READ, MEM_PROT_RW, MEM_PROT_RWX };
 320   static bool   protect_memory(char* addr, size_t bytes, ProtType prot,
 321                                bool is_committed = true);
 322 
 323   static bool   guard_memory(char* addr, size_t bytes);


< prev index next >