Michael Pliskin a écrit :
Hello Nicolas,

NC> All memory allocations of nekovm are centralized in the vm/alloc.c file.

NC> It would be possible to assign some kind of memory limitation to the GC
NC> and when the GC fail to allocate some block, throw a Neko exception. The
NC> only tricky part is that exception itself might require some memory for
NC> handling it.

NC> Also, the notion of out-of-memory is blurry on modern systems since most
NC> of the time OS use swap file in such cases.

I think what Igor meant was how VM handles the situation when malloc()
call fails. He believes that Neko (as all other VMs) just crashes, and
he wants it to exit gracefully..

Memory limitation won't help much as we don't know in advance how
other processes consume memory.

There aren't many places where malloc is called and it could be possible to call a VM-specific alloc method instead that - in case of NULL - would enable a user-custom behavior.

Only if it's needed, I can make the appropriate changes.

Best,
Nicolas

--
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to