6541756: Reduce executable C-heap

Add executable parameters to reserve_memory and commit_memory to reduce executable memory to only the Code Heap.

Reviewed-by: xlu, kvn, acorn
This commit is contained in:
Coleen Phillimore 2009-03-25 14:19:20 -04:00
parent 472349069b
commit cec3a034d1
7 changed files with 122 additions and 58 deletions

View file

@ -202,8 +202,10 @@ class os: AllStatic {
static char* attempt_reserve_memory_at(size_t bytes, char* addr);
static void split_reserved_memory(char *base, size_t size,
size_t split, bool realloc);
static bool commit_memory(char* addr, size_t bytes);
static bool commit_memory(char* addr, size_t size, size_t alignment_hint);
static bool commit_memory(char* addr, size_t bytes,
bool executable = false);
static bool commit_memory(char* addr, size_t size, size_t alignment_hint,
bool executable = false);
static bool uncommit_memory(char* addr, size_t bytes);
static bool release_memory(char* addr, size_t bytes);
@ -243,7 +245,8 @@ class os: AllStatic {
static char* non_memory_address_word();
// reserve, commit and pin the entire memory region
static char* reserve_memory_special(size_t size, char* addr = NULL);
static char* reserve_memory_special(size_t size, char* addr = NULL,
bool executable = false);
static bool release_memory_special(char* addr, size_t bytes);
static bool large_page_init();
static size_t large_page_size();