Commit Graph

4 Commits

Author SHA1 Message Date
liang.he@intel.com
79494cef74 test(mem-alloc): add tests for huge allocations and OOM scenarios 2026-04-16 13:44:19 +08:00
liang.he@intel.com
5e718e6e3d refactor(tests): remove unused includes from test files 2026-04-16 13:22:41 +08:00
liang.he@intel.com
5ac967ca2b test(mem-alloc): add tests for freeing read-only and freed pointers 2026-04-16 09:00:06 +08:00
liang.he@intel.com
779edfa277 feat(api): expose aligned allocation through wasm_runtime_aligned_alloc
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>
2026-04-16 09:00:06 +08:00