mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-13 17:00:49 +00:00
Optimse memory use for arbitrary-RR caching.
RRs 13 bytes or less don't need to allocate block storage.
This commit is contained in:
3 files changed
+86
-58
No files matched your search
+10
-2
@@ -331,8 +331,16 @@ union all_addr {
|
||||
} log;
|
||||
/* for arbitrary RR record. */
|
||||
struct {
|
||||
struct blockdata *rrdata;
|
||||
unsigned short rrtype, datalen;
|
||||
#define RR_IMDATALEN 13 /* 16 - sizeof(short) - sizeof (char) */
|
||||
unsigned short rrtype;
|
||||
char len; /* -1 for blockdata */
|
||||
union {
|
||||
char data[RR_IMDATALEN];
|
||||
struct {
|
||||
unsigned short datalen;
|
||||
struct blockdata *rrdata;
|
||||
} block;
|
||||
} u;
|
||||
} rr;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user