Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,332
    • Issues 4,332
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 370
    • Merge Requests 370
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #3048

Closed
Open
Opened Feb 25, 2009 by chevalier@alum.wellesley.edu@trac-chevalier

Heap size suggestion gets ignored when -G1 flag is passed

Try running any program with -G1 and a large -H option -- for example, cichelli from the nofib suite:

$ ./cichelli  +RTS -s -H32M -G1
[output snipped]
41,211,752 bytes allocated in the heap
      19,329,984 bytes copied during GC
       1,760,916 bytes maximum residency (34 sample(s))
          36,724 bytes maximum slop
               7 MB total memory in use (0 MB lost due to fragmentation)

Here, the suggestion of 32M seems to have been ignored, as the heap is at most 7M during execution. Whereas without -G1:

./cichelli  +RTS -s -H32M
[output snipped]
41,212,300 bytes allocated in the heap
       1,121,304 bytes copied during GC
          49,484 bytes maximum residency (1 sample(s))
          36,824 bytes maximum slop
              31 MB total memory in use (0 MB lost due to fragmentation)

Here, the size suggestion is used and a 32M heap is allocated.

Shouldn't the GC use the heap size suggestion even when there is only one generation?

Trac metadata
Trac field Value
Version 6.10.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Runtime System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#3048