Commit 823535a1 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

FlexeLint inspired garbage collection



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4969 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 0dca09dc
......@@ -39,15 +39,12 @@ extern pid_t mgt_pid;
void VCA_tweak_waiter(struct cli *cli, const char *arg);
/* mgt_shmem.c */
void *mgt_SHM_Alloc(unsigned size, const char *class, const char *type, const char *ident);
extern struct vsc_main *VSL_stats;
extern struct vsm_head *loghead;
/* varnishd.c */
struct vsb;
extern struct vsb *vident;
int Symbol_Lookup(struct vsb *vsb, void *ptr);
extern unsigned L_arg;
#define TRUST_ME(ptr) ((void*)(uintptr_t)(ptr))
......
......@@ -77,26 +77,20 @@ struct objhead {
int refcnt;
VTAILQ_HEAD(,objcore) objcs;
unsigned char digest[DIGEST_LEN];
union {
VTAILQ_HEAD(, sess) __u_waitinglist;
VTAILQ_ENTRY(objhead) __u_coollist;
} __u;
#define waitinglist __u.__u_waitinglist
#define coollist __u.__u_coollist
VTAILQ_HEAD(, sess) waitinglist;
/*----------------------------------------------------
* The fields below are for the sole private use of
* the hash implementation(s).
*/
union {
void *filler[3];
struct {
VTAILQ_ENTRY(objhead) u_n_hoh_list;
void *u_n_hoh_head;
} n;
} u;
#define hoh_list u.n.u_n_hoh_list
#define hoh_head u.n.u_n_hoh_head
} _u;
#define hoh_list _u.n.u_n_hoh_list
#define hoh_head _u.n.u_n_hoh_head
};
void HSH_DeleteObjHead(struct worker *w, struct objhead *oh);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment