-/* $OpenBSD: bgpd.h,v 1.465 2023/03/13 16:52:41 claudio Exp $ */
+/* $OpenBSD: bgpd.h,v 1.466 2023/03/28 12:06:15 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
long long prefix_cnt;
long long rib_cnt;
long long pt_cnt[AID_MAX];
+ long long pt_size[AID_MAX];
long long nexthop_cnt;
long long aspath_cnt;
long long aspath_size;
-/* $OpenBSD: rde_prefix.c,v 1.42 2022/08/17 15:15:26 claudio Exp $ */
+/* $OpenBSD: rde_prefix.c,v 1.43 2023/03/28 12:06:15 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org>
if (p == NULL)
fatal("pt_alloc");
rdemem.pt_cnt[op->aid]++;
+ rdemem.pt_size[op->aid] += pt_sizes[op->aid];
memcpy(p, op, pt_sizes[op->aid]);
return (p);
pt_free(struct pt_entry *pte)
{
rdemem.pt_cnt[pte->aid]--;
+ rdemem.pt_size[pte->aid] -= pt_sizes[pte->aid];
free(pte);
}