2

Here's the Node JS I'm running at the beginning of the script to clear the garbage collector and then logging the available space:

global.gc();
var bytes = process.memoryUsage().rss;
var GB = (bytes / 1073741824).toFixed(5);
g.heapMessage = "MEMORY used in bytes: " + bytes + ", in GB: " + GB + ",  custom message: " + m;

Here's the output to the shell:

JavaScript Extracted

JavaScript Processing
MEMORY used in bytes: 27869184, in GB: 0.02596,  custom message: INIT epochProp
^Z
[7]+  Stopped                 sudo ./runScript
oughtimpliescan1@ubuntu:~$ sudo ./runScript
-bash: fork: Cannot allocate memory
oughtimpliescan1@ubuntu:~$ 

memory fork screenshot

As you can see, there's plenty of memory, 0.02596 GB... and yet the shell keeps telling me it cannot allocate memory, I've tried the 1,2,3 of this command:

sync; echo 1 > /proc/sys/vm/drop_caches

and I'm still having this issue, anybody know what's going on?

dessert
  • 40,956
Jacob Edward
  • 121
  • 1

0 Answers0