Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Document how to set memory limits

Open
#102 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Quiet
Tech stack
java, wasm
Domain
documentation

Research direction

Start with the Resource Limits, Security Model, and Advanced Wasm Memory Customization pages, then inspect MemoryLimits, Instance.Builder#withMemoryLimits, ImportMemory, MemoryImport, TableLimits, and the referenced Instance.java code. Confirm how limits apply to multiple memories and array allocation instructions, then document the supported configuration with an example and link the Resource Limits page from the Security Model page.

Written by the indexing model from the issue text.

Description

If possible, could you please extend the documentation regarding how to set memory limits? Currently the documentation just says "set limits" but without telling how exactly.

The documentation regarding CPU limits is already pretty good, but for memory limits it is not directly clear how to apply them.

If I understand it correctly the main class is MemoryLimits, and it can be applied with Instance.Builder#withMemoryLimits. But what I don't fully understand yet is:

  • Are there other places to consider?
    E.g. there is ImportMemory and MemoryImport, but I assume they are only relevant when you are actually importing memory?
  • There is also TableLimits; is that relevant here as well?
  • The limit specified using withMemoryLimits only seems to apply to memory index 0, is that intentional and does that mean the other memories are not restricted (besides the limit which is specified in the Wasm code itself)?
  • The instructions array.new, array.new_default, array.new_fixed, array.new_data and array.new_elem create a new long[len] and don't seem to be restricted at all?
Dominant language
Java
Stars
306
Forks
20
Avg merge
1d 19h
Merged PRs (30d)
35

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bytecodealliance/endive

All issues in bytecodealliance/endive

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.