Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • 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,868
    • Issues 4,868
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 458
    • Merge requests 458
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #21588
Closed
Open
Created May 17, 2022 by Teo Camarasu@teoContributor

GHC-9.0 is too reluctant to return memory with non-copying collectors

On the ghc-9.0 branch the rts is too reluctant to return memory to the OS. See https://gitlab.haskell.org/ghc/ghc/-/blob/ghc-9.0/rts/sm/GC.c#L953:

need = need_prealloc + (RtsFlags.GcFlags.oldGenFactor + 2) * need_live;

This always keeps (F + 2)*Live memory, yet if we are using the non-moving or compacting collectors then (F+1.2)*Live should be enough.

This was fixed by afc357d2, which also introduces the -Fd flag. As this added a feature it wasn't backported. Yet, I think the part of this commit that fixes this coefficient should be backported to the 9.0 line.

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