Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allocator #1908

Merged
merged 16 commits into from
Feb 19, 2024
Merged

allocator #1908

merged 16 commits into from
Feb 19, 2024

Conversation

turuslan
Copy link
Contributor

Referenced issues

Description of the Change

  • rewrite allocator
  • MAX_POSSIBLE_ALLOCATION, MAX_WASM_PAGES
  • ignore __heap_base overwriting data segments
  • don't resize memory to __heap_base

Benefits

Possible Drawbacks

  • rust patches raw wasm if ":heappages" is specified
  • looks like rust resize(initial + ":heappages") but c++ resize(":heappages")

Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>

# Conflicts:
#	core/runtime/common/memory_allocator.cpp
#	core/runtime/common/memory_allocator.hpp
#	core/runtime/wasm_edge/memory_impl.cpp
#	test/core/host_api/memory_extension_test.cpp
#	test/mock/core/runtime/memory_mock.hpp
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
core/runtime/common/memory_allocator.cpp Show resolved Hide resolved
core/runtime/common/memory_allocator.hpp Outdated Show resolved Hide resolved
core/runtime/common/memory_allocator.cpp Outdated Show resolved Hide resolved
core/runtime/common/memory_allocator.cpp Outdated Show resolved Hide resolved
core/runtime/common/memory_allocator.cpp Outdated Show resolved Hide resolved
core/runtime/common/memory_allocator.cpp Outdated Show resolved Hide resolved
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
@turuslan turuslan requested a review from Harrm February 16, 2024 13:40
@turuslan turuslan merged commit be1a92a into master Feb 19, 2024
11 of 13 checks passed
@turuslan turuslan deleted the audit/16 branch February 19, 2024 07:43
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