sapling/remotefilelog/cdatapack
Tony Tung 30ba9cdd24 [cdatapack] madvise the memory away
Summary: Once we're done reading the delta data, we madvise it away.

Test Plan:
dump all the hashes from a datapack into a separate file.  then run a script to fetch all the delta chains.  observed that the memory footprint did not increase significantly.

```
#!/usr/bin/env python

import binascii

import cdatapack

dp = cdatapack.datapack('/dev/shm/hgcache/fbsource/packs/8b5d28f7a5bd7391a0b060c88af8cca3af357c24')

for ix, line in enumerate(open('/tmp/hashes', 'r')):
    line = line.strip()
    dp.getdeltachain(binascii.unhexlify(line))
```

Reviewers: #fastmanifest, durham

Reviewed By: durham

Subscribers: durham, mitrandir

Differential Revision: https://phabricator.intern.facebook.com/D3686830

Signature: t1:3686830:1470716333:e8fc8e3e3fa29c1931f69222c17e10f519a4a8c2
2016-08-15 11:39:14 -07:00
..
buffer.h [remotefilelog] initial checkin of a c datapack parser 2016-08-01 14:05:37 -07:00
cdatapack_dump.c [cdatapack] fix memory handling for cdatapack 2016-08-01 14:11:16 -07:00
cdatapack_get.c [cdatapack] utility to retrieve and checksum the delta chain 2016-08-03 15:29:01 -07:00
cdatapack.c [cdatapack] madvise the memory away 2016-08-15 11:39:14 -07:00
cdatapack.h [cdatapack] stricter const 2016-08-04 13:50:00 -07:00
CMakeLists.txt [cdatapack] utility to retrieve and checksum the delta chain 2016-08-03 15:29:01 -07:00
convert.h [remotefilelog] initial checkin of a c datapack parser 2016-08-01 14:05:37 -07:00
null_test.c [remotefilelog] initial checkin of a c datapack parser 2016-08-01 14:05:37 -07:00
py-cdatapack.c [cdatapack] wire up getdeltachain 2016-08-05 11:44:19 -07:00