node icon indicating copy to clipboard operation
node copied to clipboard

src: fix available memory best guess logic

Open bnoordhuis opened this issue 1 year ago • 0 comments

GuessMemoryAvailableToTheProcess() assumed that the return value of uv_get_constrained_memory() is a reasonable upper bound. It doesn't have to be, it can be much larger than actual available memory.


There's another uv_get_constrained_memory() call in src/api/environment.cc that looks mostly alright but it compares against total memory, not free memory.

bnoordhuis avatar Sep 20 '22 10:09 bnoordhuis