RFR: 8253639: Change os::attempt_reserve_memory_at parameter order
Stefan Karlsson
stefank at openjdk.java.net
Fri Sep 25 19:27:57 UTC 2020
On Fri, 25 Sep 2020 19:03:16 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> Could you add an explanation in the bug report for the reason of this change?
Sure. I thought it was obvious, but I agree a comment would be good. I added:
The motivation is that it's simply awkward to have attempt_reserve_memory_at use the opposite order of most other
memory range APIs.
Examples of APIs using the order addr, size:
1) void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
2) PVOID VirtualAlloc2(..., BaseAddress, Size, ...)
3) ReservedMemoryRegion(address base, size_t size)
4) MemRegion(HeapWord* start, size_t word_size)
5) ReservedSpace(char* base, size_t size
6) commit_memory(char* addr, size_t bytes, bool executable)
-------------
PR: https://git.openjdk.java.net/jdk/pull/359
More information about the hotspot-dev
mailing list