Skip to content

Reduce/eliminate steady-state heap allocations in sendspin-cpp #92

Closed

Description

@kahrendt

Sendspin/sendspin-cpp#220 identified a runtime failure due to a failed heap allocation in sendspin-cpp. Sendspin/sendspin-cpp#222 fixed that particular allocation, but there are still a lot more heap allocations that can cause hard failures during the connection/reconnection process.

Currently, 63 heap allocations occur when a new connection starts up. The goal is to reduce/eliminate these as much as possible to avoid heap churn giving better long-term stability.

After this list, only 5 heap allocations occur with a new connection/reconnection/pairing. Those are more challenging to eliminate, so I will think over the best approach more. There are no heap allocations in a steady run state; i.e., one active connection streaming.

Activity

  1. self-assigned this
    on Nov 3, 2026
  2. kahrendt commented on Nov 3, 2026

    @kahrendt
    Author

    Eliminating the remaining allocations:

  3. changed the title [-]Reduce/eliminate heap allocations in sendspin-cpp[/-] [+]Reduce/eliminate steady-state heap allocations in sendspin-cpp[/+] on Nov 3, 2026
  4. kahrendt commented on Nov 3, 2026

    @kahrendt
    Author

    A coherence review after these changes found some drift between the migrated pieces, plus peer data that is still copied unbounded or allocated per message:

  5. 2 remaining items

  6. kahrendt commented on Nov 19, 2026

    @kahrendt
    Author

    https://github.com/Sendspin/sendspin-cpp/releases/tag/v0.10.0 is now out with all these changes. There should be no heap allocations after setup and first audio playback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions