8151414: os::pretouch_memory should take void* instead of char*

Change parameters and remove associated casts.

Reviewed-by: pliden, stefank
This commit is contained in:
Thomas Schatzl 2016-03-09 09:56:10 +01:00
parent 00a657d109
commit 94c75d0f00
3 changed files with 4 additions and 4 deletions

View file

@ -58,7 +58,7 @@ void MutableSpace::numa_setup_pages(MemRegion mr, bool clear_space) {
}
void MutableSpace::pretouch_pages(MemRegion mr) {
os::pretouch_memory((char*)mr.start(), (char*)mr.end());
os::pretouch_memory(mr.start(), mr.end());
}
void MutableSpace::initialize(MemRegion mr,

View file

@ -1600,8 +1600,8 @@ bool os::release_memory(char* addr, size_t bytes) {
return res;
}
void os::pretouch_memory(char* start, char* end) {
for (volatile char *p = start; p < end; p += os::vm_page_size()) {
void os::pretouch_memory(void* start, void* end) {
for (volatile char *p = (char*)start; p < (char*)end; p += os::vm_page_size()) {
*p = 0;
}
}

View file

@ -325,7 +325,7 @@ class os: AllStatic {
// to make the OS back the memory range with actual memory.
// Current implementation may not touch the last page if unaligned addresses
// are passed.
static void pretouch_memory(char* start, char* end);
static void pretouch_memory(void* start, void* end);
enum ProtType { MEM_PROT_NONE, MEM_PROT_READ, MEM_PROT_RW, MEM_PROT_RWX };
static bool protect_memory(char* addr, size_t bytes, ProtType prot,