Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8253639

Change os::attempt_reserve_memory_at parameter order

    XMLWordPrintable

Details

    • b18

    Backports

      Description

        I propose that we change the paramter order from:
        os::attempt_reserve_memory_at(size, addr, <extra params>)

        to:
        os::attempt_reserve_memory_at(addr, size, <extra params>)

        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)

        Attachments

          Issue Links

            Activity

              People

                stefank Stefan Karlsson
                stefank Stefan Karlsson
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: