src/os/windows/vm/os_windows.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hs-gc-mmap Cdiff src/os/windows/vm/os_windows.cpp
src/os/windows/vm/os_windows.cpp
Print this page
rev 3899 : [mq]: mickes-originalpatch
*** 2893,2902 ****
--- 2893,2924 ----
reserve_memory(size - split, base + split);
}
}
}
+ char* os::reserve_memory_aligned(size_t bytes, size_t alignment) {
+ size_t size = align_size_up(bytes, alignment);
+ size_t extra_size = size + alignment;
+ char* aligned_base = NULL;
+
+ do {
+ char* extra_base = os::reserve_memory(extra_size, NULL, alignment);
+ if (extra_base == NULL) {
+ return NULL;
+ }
+ // Do manual alignment
+ aligned_base = (char*) align_size_up((uintptr_t) extra_base, alignment);
+
+ os::release_memory(extra_base, extra_size);
+
+ aligned_base = os::reserve_memory(size, aligned_base);
+
+ } while (aligned_base == NULL);
+
+ return aligned_base;
+ }
+
char* os::pd_reserve_memory(size_t bytes, char* addr, size_t alignment_hint) {
assert((size_t)addr % os::vm_allocation_granularity() == 0,
"reserve alignment");
assert(bytes % os::vm_allocation_granularity() == 0, "reserve block size");
char* res;
src/os/windows/vm/os_windows.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File