diff options
author | wpaul <wpaul@FreeBSD.org> | 1998-03-07 05:06:10 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1998-03-07 05:06:10 +0000 |
commit | b5a6d61144d61bee4a3f4e2af816065ad84fc974 (patch) | |
tree | 52fbfb312c63d6429cd611e7b24da83d478deff8 /usr.bin/rpcgen | |
parent | a7987039c367704a1ecc2d84b9161863b0a63b85 (diff) | |
download | FreeBSD-src-b5a6d61144d61bee4a3f4e2af816065ad84fc974.zip FreeBSD-src-b5a6d61144d61bee4a3f4e2af816065ad84fc974.tar.gz |
Fix resource allocation problems:
- Completely recoded the ypmatch cache code. The old code could leak
memory: it would allow the cache to grow, but never
shrink. The new code imposes the following limits:
o The cache is capped at a limit of 5 entries.
o Each entry expires after five seconds, at which point
its slot is freed.
o If an insertion is to be done and all five slots
are filled, the oldest entry is forcibly expired
to release its slot.
Also, the cache is implemented on a per-binding basis rather than
having a global cache covering all bindings. This means that each
bound domain has its own 5 slot cache.
- Changed clntudp_create() to clntudp_bufcreate() so that the
xmit/recv message buffer sizes can be set explicitly. NIS transactions
are rarely much larger than 1024 bytes since YPMAXRECORD is 1024.
The defaults chosen by clntudb_create() are actually much larger
than needed. I set the xmit buffer to a little over 1024 and the
recv buffer to a little over 2048. This saves a few Kbytes for each
NIS binding.
- Add my name to the copyright. I think I've made enough changes to
this file to merit it. :)
Note: these changes should go into the 2.2.x branch, but I'm waiting
on feedback from a tester to see if the cache fixes solve the reported
memory leak problem.
Diffstat (limited to 'usr.bin/rpcgen')
0 files changed, 0 insertions, 0 deletions