Skip to content
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

rsx_debugger: replace malloc with buffer cache #13372

Merged
merged 2 commits into from
Feb 8, 2023

Conversation

Megamouse
Copy link
Contributor

  • Use buffer cache instead of allocating a raw buffer
  • This also happens to fix a memory leak in the stencil buffer widget

This also fixes a memory leak.
@@ -577,7 +573,8 @@ void rsx_debugger::OnClickDrawCalls()
if (width && height && !draw_call.depth_stencil[1].empty())
{
const std::span<const std::byte> orig_buffer = draw_call.depth_stencil[1];
u8* buffer = static_cast<u8*>(std::malloc(4ULL * width * height));
Copy link
Contributor

Choose a reason for hiding this comment

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

How'd this ever get merged? 👀

Copy link
Contributor Author

Choose a reason for hiding this comment

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

probably as part of the first Qt or wx pr xD

@Megamouse
Copy link
Contributor Author

I hope this works, because i didn't test

@Megamouse Megamouse merged commit d3b7a51 into RPCS3:master Feb 8, 2023
@Megamouse Megamouse deleted the malloc branch February 8, 2023 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants