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

Move non-resource allocation strategies out of ResourceObj

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 20
    • 20
    • hotspot
    • None
    • b24

    Description

      HotSpot has a few allocation classes that other classes can inherit from to get different dynamic-allocation strategies:

      MetaspaceObj - allocates in the Metaspace
      CHeap - uses malloc
      ResourceObj - ...

      The last class sounds like it provide an allocation strategy to allocate inside a thread's resource area. This is true, but it also provides functions to allow the instances to be allocated in Areanas or even CHeap allocated memory.

      This is IMHO misleading, and often leads to confusion among HotSpot developers.

      I propose that we simplify ResourceObj to only provide an allocation strategy for resource allocations, and move the multi-allocation strategy feature to another class, which isn't named ResourceObj.

      In my proposal and prototype I've used the name AnyObj, as short, simple name. I'm open to changing the name to something else.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: