Johan Walles
44f817eb8d
Split mem_darwin.go into CGO and non CGO variants
2016-02-20 21:49:23 +01:00
Johan Walles
00504a37e3
Remove unused import
2016-02-19 23:39:00 +01:00
Johan Walles
a6cd6f803b
Use Go's built in syscall.Getpagesize()
2016-02-19 23:37:43 +01:00
Johan Walles
13e00c76e4
Use OS calls rather than exec() to get memory statistics
...
Before this change we used to exec() various binaries to find out memory
information.
While this worked, it was awfully slow.
And if somebody would want to compute how many percent of available memory all
PIDs on the system uses, that would take almost ten seconds on my laptop with
the previous implementation.
This implementation fares a lot better, and is smaller.
2016-02-19 21:28:50 +01:00
Shirou WAKAYAMA
7288e9a5af
common[all]: add internal
2015-10-20 00:04:57 +09:00
Cameron Sparr
4bba3025ca
Use vm_stat command on darwin to get memory
...
This has the benefit of allowing us to also grab the cached memory so
that we can get an "available" measurement
2015-09-18 00:24:09 -07:00
Myungjun Kim
c5b94d3e4c
memory[darwin]: return value of "sysctl hw.memsize" is memory size in bytes.
2015-08-16 16:32:53 +09:00
Shirou WAKAYAMA
a9e65ec556
mem[darwin]: fix VirtualMem stat multiply.
2015-07-23 11:39:22 +09:00
Nikolay Sivko
06282a319c
[darwin] hw.memsize already in bytes
2015-04-08 14:53:21 +03:00
若山史郎
cea341c690
mem: add 0 check to darwin.swapmem.
2015-02-26 16:23:35 +09:00
Shirou WAKAYAMA
13cd195a7e
change package name.
2014-12-30 22:09:05 +09:00
Shirou WAKAYAMA
a4671fcc2a
move subdirectories. refer to issue #24
2014-11-27 10:18:15 +09:00