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

fix: OOM abort error while injecting data #45

Merged

Conversation

RaisinTen
Copy link
Contributor

@RaisinTen RaisinTen commented Sep 28, 2022

After building Postject with -sASSERTIONS enabled, the error looked like this:

Aborted(Cannot enlarge memory arrays to size 82239488 bytes (OOM). Either (1) compile with -sINITIAL_MEMORY=X with X higher than the current value 16777216, (2) compile with -sALLOW_MEMORY_GROWTH which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -sABORTING_MALLOC=0)

so I followed option 2 in this change.

Fixes: #42
Signed-off-by: Darshan Sen [email protected]

test/cli.mjs Show resolved Hide resolved
@dsanders11
Copy link
Contributor

Can we change the commit message to be more generic? This fixes memory limits in general, not specific to Node.js, so want that to be clear.

Also, can we include all of the changes I suggested previously? I think we should set INITIAL_MEMORY to 256 MB, and MAXIMUM_MEMORY to 4 GB (max in WASM) to make this a more complete fix for WASM memory limits.

After building Postject with -sASSERTIONS enabled, the error looked like
this:
```
Aborted(Cannot enlarge memory arrays to size 82239488 bytes (OOM). Either (1) compile with -sINITIAL_MEMORY=X with X higher than the current value 16777216, (2) compile with -sALLOW_MEMORY_GROWTH which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -sABORTING_MALLOC=0)
```
so I followed option 2 in this change.

Fixes: #42
Signed-off-by: Darshan Sen <[email protected]>
Resolves a code review comment.

Signed-off-by: Darshan Sen <[email protected]>
@RaisinTen RaisinTen force-pushed the fix/OOM-abort-error-while-injecting-data-into-Node.js branch from 641d7b3 to 285825d Compare September 29, 2022 04:49
@RaisinTen RaisinTen changed the title fix: OOM abort error while injecting data into Node.js fix: OOM abort error while injecting data Sep 29, 2022
@RaisinTen
Copy link
Contributor Author

@dsanders11 done, PTAL!

@dsanders11 dsanders11 merged commit a87c2fb into main Sep 30, 2022
@dsanders11 dsanders11 deleted the fix/OOM-abort-error-while-injecting-data-into-Node.js branch September 30, 2022 03:52
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.

OOM abort error
2 participants