Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

am: Fix too much file handle cause memory leak, this fix cia installation #266

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

R-YaTian
Copy link

@R-YaTian R-YaTian commented Sep 29, 2024

If cia has more than 507 ncch content, am service will open too much file handle which cause memory leak.
This PR will fix this issue by checking content count, if content count big than 255, will close the file handle after used, and reopen it next time.
Now we can install MM4 DLC which has 711 ncch content.
Tested it on Windows and works fine...

src/core/hle/service/am/am.cpp Outdated Show resolved Hide resolved
src/core/hle/service/am/am.cpp Outdated Show resolved Hide resolved
src/core/hle/service/am/am.cpp Outdated Show resolved Hide resolved
@R-YaTian R-YaTian requested a review from PabloMK7 October 12, 2024 04:50
@fight-fly
Copy link

I think the title can be considered to add some words like these
'fix cia installation'.
That can make people easily find out what work it did.

Thank you, you do a good job.

@R-YaTian R-YaTian changed the title am: Fix too much file handle cause memory leak am: Fix too much file handle cause memory leak, this fix cia installation Oct 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants