akheron/jansson — pull request #213 by chadbarth (2014-12-16 23:08:54+00:00)
Title: Allow initial number of initial buckets to be configured

In an embedded system with limited memory pools available, upgrading to Jansson 2.6+ had major implications due to the significant increase in memory allocation for an empty object. Many of our objects have just a small handful of key/value pairs and the initial 64-byte allocation for the buckets is wasteful in our case. For situations where many small objects will be allocated, we would like to be able to configure the initial value of `hashtable->order`.

This Pull Request is to suggest two possible solutions, on separate commits. A compile-time option and a run-time option. Theoretically either commit could be cherry-picked.

Please consider including something along these lines in the master branch.

Thanks,
-Chad Barth