Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,837
    • Issues 4,837
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 449
    • Merge requests 449
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #20462

Closed
Open
Created Oct 02, 2021 by Orpheus@orpheus-antpool

GC improvement: keep separate object metadata in a compact set of memory pages to avoid full sweeping

Motivation

In the current implementation, both the blocking and non-moving GC seem (I didn't check the code) to sweep over all allocated memory pages of the heap. This causes trashing when swap space is used to complement main memory. Even without swap space and the problem of trashing, this is a problem for two reasons: (1) in the case of blocking GC it causes long downtime especially if the heap is large and the memory bandwidth is low (e.g. Raspberry Pi); (2) in the case of non-blocking GC, it causes heavy competition for memory bandwidth, slowing down memory accesses.

Proposal

A much better approach would be to keep a separate compact set of memory pages with metadata about what objects are present in the allocation areas, so that the garbage collector has to sweep over a small memory area only and directly release the other memory pages without touching them.

Edited Oct 03, 2021 by Orpheus
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking