The FreeBSD build is no longer working, and I no longer have a Google
Cloud account. I'm disabling it for the time being, until there's a
better way to do this.
Currently, the ${curl} directive only uses the first 127 characters in
the given URL, discarding the rest. Change the parsing in
curl_parse_arg to dynamically allocate the URL string instead,
allowing ${curl} to use URLs of any length.
On Linux, use the newer field presented by the kernel for calculating
the amount of memory in use. This was introduced in commit
34e431b0ae398fc54ea69ff85ec700722c9da773 to the Linux kernel.
Signed-off-by: Joseph Benden <joe@benden.us>
This seems to be causing some issues with clobbering memory values, and
since there is callback functionality already working, this seems
unnecessary.
* Make all calculations local to function
I moved from making the assignments and calculations of certain memory
values to doing the calculations on local variables and assigning them
at the end of the function for update_meminfo().
This is to keep the info.memX variables from having 'intermediary'
values that may give wrong values to other functions if the structure is
read from while the function is currently executing.
As a matter of keeping the variables consistent across function calls, I
removed the zeroing out of certain info struct variables so that if they
are read from, they'll still report a sane value. Since the only change
to the value a direct assignment at the end of the function, they
shouldn't need zeroing out in the first place.
There's not a single instance of using info.bufmem in any other source
file aside from linux.cc. If there was any plan to use this check (and
info.bufmem) with any other source file, the check should be made in
that specific source file instead.