• Home
    • View
    • Login
    This page
    • Normal
    • Export PDF
    • Page Information

    Loading...
  1. Dashboard
  2. Undefined Space
  3. HotSpot
  4. Metaspace

Page History

Versions Compared

Old Version 6

changes.mady.by.user Thomas Stuefe

Saved on Oct 28, 2020

compared with

New Version 7

changes.mady.by.user Iris Clark

Saved on Jan 17, 2025

  • Previous Change: Difference between versions 5 and 6
  • Next Change: Difference between versions 7 and 8
  • View Page History

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Metaspace implementation is divided into separate sub systems, each of which is isolated from its peers and has a small number of tasks.

Image Added

All Subsystems

The Virtual Memory Subsystem

...

  • "Allocate new root chunk"

    Metachunk* VirtualSpaceList::allocate_root_chunk();

    This carves out a new root chunk from the underlying reserved space and hands it to the caller (nothing is committed yet, this is purely reserved memory).

  • "commit this range"

    bool VirtualSpaceNode::ensure_range_is_committed(MetaWord* p, size_t word_size);

    Upper layers request that a given arbitrary address range should be committed. Subsystem figures out which granules would be affected and makes sure those are committed (which may be a noop if they had been committed before).

    When committing, subsystem honors VM limits (MaxMetaspaceSize resp. the commit gc threshold) via the commit limiter.

  • "uncommit this range"

    void VirtualSpaceNode::uncommit_range(MetaWord* p, size_t word_size);

    Similar to committing. Subsystem figures out which commit granules are affected, and uncommits those.

     

  • "purge" 

    void VirtualSpaceList::purge()

    This unmaps all completely empty memory regions, and uncommits all unused commit granules.

...

base                                                                    end
 |                                                                       |
 v                                                                       v

 | root chunk area | root chunk area | root chunk area | root chunk area |

 |x| |x|x|x| | | | |x|x|x| | | |x|x| | | |x|x|x|x| | | | | |x| |x| | | | |    <-- commit granules (x=committed)
 
CommitMask

(commitMask.hpp) 

...

Overview
Content Tools
ThemeBuilder

Terms of Use
• License: GPLv2
• Privacy • Trademarks • Contact Us

Powered by a free Atlassian Confluence Open Source Project License granted to https://www.atlassian.com/software/views/opensource-community-additional-license-offer. Evaluate Confluence today.

  • Kolekti ThemeBuilder Powered by Atlassian Confluence 8.5.21
  • Kolekti ThemeBuilder printed.by.atlassian.confluence
  • Report a bug
  • Atlassian News
Atlassian
Kolekti ThemeBuilder EngineAtlassian Confluence
{"serverDuration": 398, "requestCorrelationId": "0ca3631104b4f74b"}