Closed DavidBal closed 5 months ago
Hi @DavidBal,
That exception is thrown in the following situations:
MaxArrayBufferAllocation
.calloc
function failed to acquire a memory block of the requested size.If you aren't specifying MaxArrayBufferAllocation
, then the latter is most likely. Note that 365MB is a significant portion of the address space available to a 32-bit process, so even if sufficient total space is available, there may not be a contiguous free block of that size.
Good luck!
Hi @ClearScriptLib,
thank you for the quick answer.
MaxArrayBufferAllocation
is not specified and is his default value ulong.MaxValue.
So it "must" be the calloc call that fails. I feared something like that...
Thanks again for your quick answer.
Best regards, David
Hi,
i have the following simplified code.
I am building for x86 (32bit). Here is my csprj file:
If i execute the code above i getting the following execption:
RangeError: Array buffer allocation failed
The exception is thrown when the engines executes the
new Uint8Array(...)
for a large number, in this example 356000000 what should be something around 365MB.It works for x64 but, but thats not an option at the moment.
Because of that i think the reason could be some kind of memory limitation for x86 processes. Could you please confirm that for me?
Best regards, David