Adapt and update AccessLabs' patches for reduced Tor memory consumption for embedded devices
These are a set of patches written by Access Labs. They claim that these patches reduce memory usage on small low memory devices.
The patches are in several different areas:
- using anonymous mmap() for storing large chunks of data (instead of tempfiles)
- persisting the keys into /etc/tor/keys, rather than putting them in /var (tmpfs on OpenWRT)
- using fixed values for should_rebuild_md_cache() && router_should_rebuild_store()
- reducing the age of microdesc (changing the compile time defines)
- using gzipped files for storing cache
I am including the files here as one ticket item rather than 5, but it might make sense to break them up into separate issues.
The source for these changes is the TorWRT package from Access Labs: https://accesslabs.org/wiki/TorWRT