Skip to content

Remove heap allocation from netrecv_from #177

@rafaelsamenezes

Description

@rafaelsamenezes

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: libretro/RetroArch#16184 (comment)

In my tests, replacing the netrecv_from seems to fix the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions