erlang/otp — pull request #75 by dotsimon (2013-09-10 20:21:26+00:00)
Title: Fix inconsistency in free_memory value on Linux platforms

Since this didn't get any comment on erlang_bugs, I'm submitting it as a pull request.

The documentation for memsup:get_system_memory_data() states the
free_memory element contains the "amount of free memory available to
the Erlang emulator for allocation". However later a note states that
this is not true for Linux.

This patch corrects the inconsistency by adding the memory allocated by
kernel buffers and caches back to the kernel "free" value. It also
modifies the note to the effect that these value are included in
free_memory.

With this patch, a user application that monitors and/or reports free
memory can rely on the meaning of free_memory to be consistent across
deployed platforms.