New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potential memory leak in sceHeap #18952
Milestone
Comments
here is a list of games that contain the string
|
Here is another list of games that have the
|
No need to dig for more examples, these will do nicely, thanks. |
GermanAizek
added a commit
to GermanAizek/ppsspp
that referenced
this issue
Apr 2, 2024
GermanAizek
added a commit
to GermanAizek/ppsspp
that referenced
this issue
Apr 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Game or games this happens in
Not game-specific
What area of the game / PPSSPP
CLion's code inspection noticed that the function
sceHeapCreateHeap
(defined here) allocates theHeap
object withoperator new
and saves its address in theheapList
, after which the variable that holds onto the pointer goes out of scope as the function ends. CLion thought it's a leak, but I didn't believe it and went to check how theheapList
is managed.heapList
is a static variable and it's only available in its*.cpp
file.getHeap
is a static function.operator delete
that can be used to deallocate the previously saved heap instance is located in the HLE functionsceHeapDeleteHeap
.I don't think the emu can prevent the leak if the user reloads the game, exists the game or loads a savestate.
What should happen
I don't think it's a very important leak (considering I couldn't remember a single game that uses
sceHeap
right away, it's not too widely used), but it's just way too blatant. Gotta fix that.Interestingly enough, we've got 3 unimplemented functions in this module. Maybe for another time...
(By the way, please consider renaming
found
toit
oriter
here, becauseauto found
suggests a boolean value).Logs
No response
Platform
Windows
Mobile device model or graphics card (GPU)
AMD Radeon(TM) Graphics
PPSSPP version affected
Self-built version (one of the lastest)
Last working version
No response
Graphics backend (3D API)
Direct3D 11
Checklist
The text was updated successfully, but these errors were encountered: