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

Remove ArrayAllocatorMallocLimit

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • None
    • hotspot
    • None

      ArrayAllocatorMallocLimit was introduced in JDK-7197666 for Solaris support:

      https://github.com/openjdk/jdk/commit/4a685f181b71f534118a40a3314cb09e285c84e8

      // Uses the OS malloc for allocations smaller than ArrayAllocatorMallocLimit
      // and uses mapped memory for larger allocations.
      // Most OS mallocs do something similar but Solaris malloc does not revert
      // to mapped memory for large allocations. By default ArrayAllocatorMallocLimit
      // is set so that we always use malloc except for Solaris where we set the
      // limit to get mapped memory.

      Since the removal of Solaris support in JDK-8244224, ArrayAllocatorMallocLimit is not useful for any existing ports. It has remained an experimental VM option since its addition more than 10 years ago. I suspect no one is actually using it, since this flag must be set with -XX:+ArrayAllocatorMallocLimit.

      ArrayAllocatorMallocLimit should be removed, along with MmapArrayAllocator. We should also remove the 'length' and 'old_length' parameters to ArrayAllocator::freeI() and ArrayAllocator::reallocate(), respectively.

            azafari Afshin Zafari
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: