Skip to content

Feat: aligned allocation#4886

Draft
lum1n0us wants to merge 1 commit intobytecodealliance:mainfrom
lum1n0us:feat/aligned-allocation
Draft

Feat: aligned allocation#4886
lum1n0us wants to merge 1 commit intobytecodealliance:mainfrom
lum1n0us:feat/aligned-allocation

Conversation

@lum1n0us
Copy link
Copy Markdown
Contributor

@lum1n0us lum1n0us commented Mar 20, 2026

Please refer to core/shared/mem-alloc/ems/ems_gc_internal.h in PR to get more details about arch.

@lum1n0us lum1n0us force-pushed the feat/aligned-allocation branch from a02ad8b to 6d08a77 Compare March 26, 2026 05:00
Add public API for aligned memory allocation, exposing the existing
mem_allocator_malloc_aligned infrastructure through wasm_export.h.

- Add wasm_runtime_aligned_alloc() API declaration with documentation
- Implement internal helper wasm_runtime_aligned_alloc_internal()
- Add public function with size/alignment validation
- POOL mode only, returns NULL for other memory modes
- Follows wasm_runtime_malloc() patterns for consistency

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@lum1n0us lum1n0us force-pushed the feat/aligned-allocation branch from 6d08a77 to 21857a9 Compare March 27, 2026 02:44
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.

1 participant