You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.
The following code results in emscripten running out of memory
var mr = new MiniRandom(257);
var keptObjects = new object[1000];
for (var i = 0; i < 1000000; i++)
{
var r = mr.Next();
object o;
o = new long[20000]; // large object heap, 160000 > 85KB
keptObjects[r % 1000] = o;
}
This should only be around 160,012,000 bytes, but it appears to go over 2GB
emscripten_realloc_buffer: Attempted to grow heap from 2130444288 bytes to 2147483648 bytes, but got error: RangeError: WebAssembly.Memory.grow(): Maximum memory size exceeded
emscripten_realloc_buffer: Attempted to grow heap from 2130444288 bytes to 2147483648 bytes, but got error: RangeError: WebAssembly.Memory.grow(): Maximum memory size exceeded
emscripten_realloc_buffer: Attempted to grow heap from 2130444288 bytes to 2147483648 bytes, but got error: RangeError: WebAssembly.Memory.grow(): Maximum memory size exceeded
Failed to grow the heap from 2130444288 bytes to 2147483648 bytes, not enough memory!
emscripten_realloc_buffer: Attempted to grow heap from 2130444288 bytes to 2147483648 bytes, but got error: RangeError: WebAssembly.Memory.grow(): Maximum memory size exceeded
emscripten_realloc_buffer: Attempted to grow heap from 2130444288 bytes to 2147483648 bytes, but got error: RangeError: WebAssembly.Memory.grow(): Maximum memory size exceeded
emscripten_realloc_buffer: Attempted to grow heap from 2130444288 bytes to 2147483648 bytes, but got error: RangeError: WebAssembly.Memory.grow(): Maximum memory size exceeded
Failed to grow the heap from 2130444288 bytes to 2147483648 bytes, not enough memory!
Assertion failed: ret == 0, at: E:\GitHub\corert\src\Native\gc\unix\gcenv.unix.cpp,627,VirtualReserveInner
exception thrown: RuntimeError: abort(Assertion failed: ret == 0, at: E:\GitHub\corert\src\Native\gc\unix\gcenv.unix.cpp,627,VirtualReserveInner) at Error
at jsStackTrace (E:\github\corert\tests\src\Simple\HelloWasm\bin\Debug\wasm\native\HelloWasm.js:2079:19)
at stackTrace (E:\github\corert\tests\src\Simple\HelloWasm\bin\Debug\wasm\native\HelloWasm.js:2096:16)
at abort (E:\github\corert\tests\src\Simple\HelloWasm\bin\Debug\wasm\native\HelloWasm.js:1796:44)
at ___assert_fail (E:\github\corert\tests\src\Simple\HelloWasm\bin\Debug\wasm\native\HelloWasm.js:2570:7)
at VirtualReserveInner(unsigned long, unsigned long, unsigned int, unsigned int) (wasm-function[22264]:0x105b320)
at GCToOSInterface::VirtualReserve(unsigned long, unsigned long, unsigned int, unsigned short) (wasm-function[22263]:0x105b01e)
at WKS::gc_heap::grow_brick_card_tables(unsigned char*, unsigned char*, unsigned long, WKS::heap_segment*, WKS::gc_heap*, int) (wasm-function[21342]:0xf6aee1)
at WKS::gc_heap::get_segment(unsigned long, WKS::gc_oh_num) (wasm-function[21321]:0xf6661c)
at WKS::gc_heap::get_segment_for_uoh(int, unsigned long) (wasm-function[21358]:0xf6cc33)
at WKS::gc_heap::get_uoh_segment(int, unsigned long, int*) (wasm-function[21360]:0xf6d7b0),RuntimeError: abort(Assertion failed: ret == 0, at: E:\GitHub\corert\src\Native\gc\unix\gcenv.unix.cpp,627,VirtualReserveInner) at Error
at jsStackTrace (E:\github\corert\tests\src\Simple\HelloWasm\bin\Debug\wasm\native\HelloWasm.js:2079:19)
at stackTrace (E:\github\corert\tests\src\Simple\HelloWasm\bin\Debug\wasm\native\HelloWasm.js:2096:16)
at abort (E:\github\corert\tests\src\Simple\HelloWasm\bin\Debug\wasm\native\HelloWasm.js:1796:44)
at ___assert_fail (E:\github\corert\tests\src\Simple\HelloWasm\bin\Debug\wasm\native\HelloWasm.js:2570:7)
at VirtualReserveInner(unsigned long, unsigned long, unsigned int, unsigned int) (wasm-function[22264]:0x105b320)
at GCToOSInterface::VirtualReserve(unsigned long, unsigned long, unsigned int, unsigned short) (wasm-function[22263]:0x105b01e)
at WKS::gc_heap::grow_brick_card_tables(unsigned char*, unsigned char*, unsigned long, WKS::heap_segment*, WKS::gc_heap*, int) (wasm-function[21342]:0xf6aee1)
at WKS::gc_heap::get_segment(unsigned long, WKS::gc_oh_num) (wasm-function[21321]:0xf6661c)
at WKS::gc_heap::get_segment_for_uoh(int, unsigned long) (wasm-function[21358]:0xf6cc33)
at WKS::gc_heap::get_uoh_segment(int, unsigned long, int*) (wasm-function[21360]:0xf6d7b0)
at abort (E:\github\corert\tests\src\Simple\HelloWasm\bin\Debug\wasm\native\HelloWasm.js:1802:11)
at ___assert_fail (E:\github\corert\tests\src\Simple\HelloWasm\bin\Debug\wasm\native\HelloWasm.js:2570:7)
at VirtualReserveInner(unsigned long, unsigned long, unsigned int, unsigned int) (wasm-function[22264]:0x105b320)
at GCToOSInterface::VirtualReserve(unsigned long, unsigned long, unsigned int, unsigned short) (wasm-function[22263]:0x105b01e)
at WKS::gc_heap::grow_brick_card_tables(unsigned char*, unsigned char*, unsigned long, WKS::heap_segment*, WKS::gc_heap*, int) (wasm-function[21342]:0xf6aee1)
at WKS::gc_heap::get_segment(unsigned long, WKS::gc_oh_num) (wasm-function[21321]:0xf6661c)
at WKS::gc_heap::get_segment_for_uoh(int, unsigned long) (wasm-function[21358]:0xf6cc33)
at WKS::gc_heap::get_uoh_segment(int, unsigned long, int*) (wasm-function[21360]:0xf6d7b0)
at WKS::gc_heap::uoh_get_new_seg(int, unsigned long, int*, oom_reason*) (wasm-function[21549]:0xf9b385)
at WKS::gc_heap::allocate_uoh(int, unsigned long, alloc_context*, unsigned int, int) (wasm-function[21553]:0xf9d6dc)
If the large arrays are not stored then this code completes, so it appears collection is at least occurring sometimes.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The following code results in emscripten running out of memory
This should only be around 160,012,000 bytes, but it appears to go over 2GB
If the large arrays are not stored then this code completes, so it appears collection is at least occurring sometimes.
The text was updated successfully, but these errors were encountered: