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

JRE instances could share mmap()ed image of jarfiles if they were uncompressed

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P3 P3
    • None
    • 1.4.0_01
    • hotspot
    • generic
    • generic

      A JRE has to uncompress each class to interpret or JIT it. Each JRE instance
      has it's own copy of the uncompressed bytecode.

      If the jarfiles used no compression, the JRE could directly mmap() the
      bytecode in MAP_SHARED/PROT_READ mode; this would allow it to be
      directly shared by other JRE instances without any other IPC.
      It also avoids using memory for both the filesystem image (compressed)
      and a heap buffer containing the uncompressed bytecode.

      If disk-space is at a premium, a compressed jarfile could be used, but
      if the jarfile contains no compressed entries it could be simply
      mmap()ed and shared, thus reducing memory footprint.

      Clearly it would be even better if JIT-ed code could also be shared
      or even persisted, but sharing byte-code would be a great start.

            foliversunw Fred Oliver (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: