Another interesting question: is there an API on the main OSes to get the cache sizes? We could make the default minimum heap size dependent on the cache size.
For windows, it seems there's an API: http://stackoverflow.com/questions/150294/how-to-programmatically-get-the-cp...
For linux, it seems that libproccpuinfo would allow you to read /sys/devices/system/cpu/cpu0/cache/index2/size properly, and thus get the information as well.
I currently don't have a FreeBSD machine to check for this OS what to do, but I assume it's accessible with the `sysctl` tool, and that an API exists for it as well.
P!