antirez/redis — pull request #1820 by mattsta (2014-06-17 15:23:49+00:00)
Title: INFO output: Add maxmemory_policy and total system memory

Add some useful config and system data we can use in crash output.

My first attempt at getting system memory involved the very clean OS X `sysctl` interface. After I committed it, it seemed a bit _too_ easy. On further inspection, of course, there's no cross-platform stable way of getting system memory.

I ended up tweaking a [very comprehensive memory discovery function](http://nadeausoftware.com/articles/2012/09/c_c_tip_how_get_physical_memory_size_system) and it works great.

New output sample:
```haskell
# Memory
used_memory:1009056
used_memory_human:985.41K
used_memory_rss:1712128
used_memory_peak:1009056
used_memory_peak_human:985.41K
total_system_memory:17179869184
total_system_memory_human:16.00G
used_memory_lua:33792
mem_fragmentation_ratio:1.70
mem_allocator:libc
maxmemory_policy:noeviction
```