libogc
libogc copied to clipboard
Remove heap allocation from netrecv_from
Feature Request
What feature are you suggesting?
Overview:
- Remove the heap allocation from the netrecv_from method or expose a function that skips the allocation.
Smaller Details:
- Alter the function so it does not need an extra allocation.
- An alternative would be to expose a new function that avoids such allocation
Nature of Request:
- Change
Why would this feature be useful?
Projects that rely on arena allocators can take up the full mem2 space beforehand. This makes network request fail with no memory available even though the provided buffer could be used directly. I did not find any alternatives, please let me known if I am missing something.
For my use case, there is an issue of using retroachievements with retroarch: https://github.com/libretro/RetroArch/issues/16184#issuecomment-1951493281
In my tests, replacing the netrecv_from
seems to fix the problem.