Skip to content

Conversation

@jserv
Copy link
Collaborator

@jserv jserv commented Aug 13, 2025

Replace malloc/free with arena allocation for TYPES and PH2_IR_FLATTEN arrays. These fixed-size allocations are now managed by GENERAL_ARENA, providing:

  • Faster allocation (O(1) vs O(log n))
  • Simplified cleanup in global_release()

Summary by Bito

This pull request enhances memory management by replacing traditional malloc/free calls with arena allocation for the TYPES and PH2_IR_FLATTEN arrays, improving allocation speed and simplifying cleanup in the global_release function, thus boosting overall performance.

Replace malloc/free with arena allocation for TYPES and PH2_IR_FLATTEN
arrays. These fixed-size allocations are now managed by GENERAL_ARENA,
providing:
- Faster allocation (O(1) vs O(log n))
- Simplified cleanup in global_release()
@jserv jserv merged commit b1d171f into master Aug 13, 2025
12 checks passed
@jserv jserv deleted the arena-alloc branch August 13, 2025 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants