Better estimate.

git-svn-id: file:///svn/unbound/trunk@278 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2007-05-04 06:56:37 +00:00
parent 8420d0b819
commit 3fea680228
2 changed files with 5 additions and 3 deletions

View file

@ -1,3 +1,6 @@
4 May 2007: Wouter
- msgreply sizefunc is more accurate.
3 May 2007: Wouter
- fill refs. Use new parse and encode to answer queries.
- stores rrsets in cache.

View file

@ -476,9 +476,8 @@ msgreply_sizefunc(void* k, void* d)
struct reply_info* r = (struct reply_info*)d;
size_t s = sizeof(struct msgreply_entry) + sizeof(struct reply_info)
+ q->qnamesize;
if(r->rrset_count > 0)
s += r->rrset_count * (sizeof(struct ub_packed_rrset_key*) +
sizeof(struct rrset_ref));
s += (r->rrset_count-1) * sizeof(struct rrset_ref);
s += r->rrset_count * sizeof(struct ub_packed_rrset_key*);
return s;
}