Skip to content

Fix incorrect placement of tot rows sum#321

Open
Arleee1 wants to merge 1 commit intoUVA-LavaLab:mainfrom
Arleee1:alloc-rows-fix
Open

Fix incorrect placement of tot rows sum#321
Arleee1 wants to merge 1 commit intoUVA-LavaLab:mainfrom
Arleee1:alloc-rows-fix

Conversation

@Arleee1
Copy link
Copy Markdown
Collaborator

@Arleee1 Arleee1 commented Feb 17, 2026

Currently, pimAlloc does not update m_totRowsInUse correctly. If a region is aggregated with another region, then the number of rows in the new region is added to the total rows, but the rows in the original region are not subtracted, and thus double counted.

This PR fixes the above by adding the number of new rows to m_totRowsInUse before aggregating regions.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a critical bug in the PIM resource manager where row counts were being double-counted when memory regions were aggregated. The issue occurred because the total row count was updated after region aggregation, causing the aggregated region size (which includes previously counted rows) to be added instead of just the new rows.

Changes:

  • Move m_totRowsInUse increment to before region aggregation logic in coreUsage::addRange

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants