mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +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:
@@ -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