45 #if defined (POINTER_DEBUG) 53 #if defined (POINTER_DEBUG) 62 memset (h, 0,
sizeof *h);
76 #if defined (POINTER_DEBUG) 84 #if defined (POINTER_DEBUG) 106 #if defined (POINTER_DEBUG) 113 option_chain_head = *ptr;
114 *ptr = (
struct option_chain_head *)0;
115 --option_chain_head ->
refcnt;
118 if (option_chain_head ->
refcnt > 0)
121 if (option_chain_head ->
refcnt < 0) {
123 #if defined (DEBUG_RC_HISTORY) 124 dump_rc_history (option_chain_head);
126 #if defined (POINTER_DEBUG) 134 for (car = option_chain_head ->
first; car; car = cdr) {
155 #if defined (POINTER_DEBUG) 163 #if defined (POINTER_DEBUG) 166 *ptr = (
struct group *)0;
172 memset (g, 0,
sizeof *g);
186 #if defined (POINTER_DEBUG) 194 #if defined (POINTER_DEBUG) 197 *ptr = (
struct group *)0;
215 #if defined (POINTER_DEBUG) 223 *ptr = (
struct group *)0;
229 if (group ->
refcnt < 0) {
231 #if defined (DEBUG_RC_HISTORY) 232 dump_rc_history (group);
234 #if defined (POINTER_DEBUG) 242 group_object_dereference (&group ->
object,
file,
line);
314 memcpy(rval + 1,
name, len);
315 rval->
name = (
char *)(rval + 1);
388 free_pairs = foo -> cdr;
389 memset (foo, 0,
sizeof *foo);
397 memset (foo, 0,
sizeof *foo);
411 #if defined (DEBUG_MEMORY_LEAKAGE) || \ 412 defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT) 413 void relinquish_free_pairs ()
417 for (pf = free_pairs; pf; pf = pc) {
421 free_pairs = (
pair)0;
434 if (free_expressions) {
436 free_expressions = rval ->
data.
not;
443 memset (rval, 0,
sizeof *rval);
455 #if defined (POINTER_DEBUG) 463 #if defined (POINTER_DEBUG) 481 free_expressions = expr;
485 #if defined (DEBUG_MEMORY_LEAKAGE) || \ 486 defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT) 487 void relinquish_free_expressions ()
491 for (e = free_expressions; e; e = n) {
508 if (free_binding_values) {
510 free_binding_values = rval ->
value.
bv;
517 memset (rval, 0,
sizeof *rval);
529 #if defined (POINTER_DEBUG) 537 #if defined (POINTER_DEBUG) 555 free_binding_values = bv;
559 #if defined (DEBUG_MEMORY_LEAKAGE) || \ 560 defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT) 561 void relinquish_free_binding_values ()
565 for (b = free_binding_values; b; b = n) {
583 memset (rval, 0,
sizeof *rval);
595 #if defined (POINTER_DEBUG) 603 #if defined (POINTER_DEBUG) 606 *ptr = (
struct fundef *)0;
617 #if defined (DEBUG_MEMORY_LEAKAGE) || \ 618 defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT) 619 void relinquish_free_option_caches ()
623 for (o = free_option_caches; o; o = n) {
638 if (free_option_caches) {
648 memset (rval, 0,
sizeof *rval);
660 #if defined (POINTER_DEBUG) 668 #if defined (POINTER_DEBUG) 694 memset (bp, 0,
sizeof *bp);
707 #if defined (POINTER_DEBUG) 715 #if defined (POINTER_DEBUG) 718 *ptr = (
struct buffer *)0;
734 #if defined (POINTER_DEBUG) 743 #if defined (POINTER_DEBUG) 754 }
else if ((*ptr) ->
refcnt < 0) {
756 #if defined (DEBUG_RC_HISTORY) 757 dump_rc_history (*ptr);
759 #if defined (POINTER_DEBUG) 765 *ptr = (
struct buffer *)0;
780 memset (bp, 0,
sizeof *bp);
794 #if defined (POINTER_DEBUG) 802 #if defined (POINTER_DEBUG) 821 #if defined (POINTER_DEBUG) 830 if ((*ptr)->refcnt == 0) {
832 }
else if ((*ptr)->refcnt < 0) {
834 #if defined (DEBUG_RC_HISTORY) 835 dump_rc_history (*ptr);
837 #if defined (POINTER_DEBUG) 856 #if defined (POINTER_DEBUG) 864 #if defined (POINTER_DEBUG) 874 memset (*ptr, 0, size);
892 #if defined (POINTER_DEBUG) 900 #if defined (POINTER_DEBUG) 922 #if defined (POINTER_DEBUG) 933 if (options ->
refcnt > 0)
936 if (options ->
refcnt < 0) {
938 #if defined (DEBUG_RC_HISTORY) 939 dump_rc_history (options);
941 #if defined (POINTER_DEBUG) 969 memset (bp, 0,
sizeof *bp);
981 #if defined (POINTER_DEBUG) 989 #if defined (POINTER_DEBUG) 1001 static struct packet *free_packets;
1003 #if defined (DEBUG_MEMORY_LEAKAGE) || \ 1004 defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT) 1005 void relinquish_free_packets ()
1008 for (p = free_packets; p; p = n) {
1012 free_packets = (
struct packet *)0;
1025 #if defined (POINTER_DEBUG) 1033 #if defined (POINTER_DEBUG) 1036 *ptr = (
struct packet *)0;
1042 free_packets = (
struct packet *)(p ->
raw);
1048 memset (p, 0,
sizeof *p);
1062 #if defined (POINTER_DEBUG) 1070 #if defined (POINTER_DEBUG) 1073 *ptr = (
struct packet *)0;
1090 if (!ptr || !*ptr) {
1092 #if defined (POINTER_DEBUG) 1100 *ptr = (
struct packet *)0;
1103 if (packet ->
refcnt > 0)
1106 if (packet ->
refcnt < 0) {
1108 #if defined (DEBUG_RC_HISTORY) 1109 dump_rc_history (packet);
1111 #if defined (POINTER_DEBUG) 1130 free_packets = packet;
1144 #if defined (POINTER_DEBUG) 1152 #if defined (POINTER_DEBUG) 1161 memset (d, 0,
sizeof *d);
1175 #if defined (POINTER_DEBUG) 1183 #if defined (POINTER_DEBUG) 1204 #if defined (POINTER_DEBUG) 1213 #if defined (POINTER_DEBUG) 1223 memset (bp, 0,
sizeof *bp);
1236 #if defined (POINTER_DEBUG) 1244 #if defined (POINTER_DEBUG) 1268 dest -> data = src -> data;
1269 dest -> terminated = src -> terminated;
1270 dest -> len = src -> len;
1283 memset (data, 0,
sizeof *data);
1294 if (len < dp ->
len) {
#define rc_register(file, line, reference, addr, refcnt, d, f)
int executable_statement_reference(struct executable_statement **ptr, struct executable_statement *bp, const char *file, int line)
int executable_statement_allocate(struct executable_statement **ptr, const char *file, int line)
int fundef_reference(struct fundef **ptr, struct fundef *src, const char *file, int line)
struct option_cache * free_option_caches
int executable_statement_dereference(struct executable_statement **ptr, const char *file, int line)
struct universe * new_universe(char *file, int line) const
isc_result_t omapi_object_dereference(omapi_object_t **h, const char *file, int line)
int option_cache_dereference(struct option_cache **ptr, const char *file, int line)
void free_domain_search_list(struct domain_search_list *ptr, const char *file, int line)
int expression_allocate(struct expression **cptr, const char *file, int line)
int binding_value_reference(struct binding_value **ptr, struct binding_value *src, const char *file, int line)
pair new_pair(char *file, int line) const
int group_reference(struct group **ptr, struct group *bp, const char *file, int line)
void data_string_forget(struct data_string *data, const char *file, int line)
void free_universe(struct universe *ptr, const char *file, int line)
int option_cache_reference(struct option_cache **ptr, struct option_cache *src, const char *file, int line)
int fundef_allocate(struct fundef **cptr, const char *file, int line)
int log_error(const char *,...) __attribute__((__format__(__printf__
int dns_zone_reference(struct dns_zone **ptr, struct dns_zone *bp, const char *file, int line)
struct domain_search_list * new_domain_search_list(char *file, int line) const
struct name_server * new_name_server(char *file, int line) const
struct option_state * options
void data_string_truncate(struct data_string *dp, int len)
void free_name_server(struct name_server *ptr, const char *file, int line)
int buffer_reference(struct buffer **ptr, struct buffer *bp, const char *file, int line)
int binding_value_allocate(struct binding_value **cptr, const char *file, int line)
struct executable_statement * statements
int option_cache_allocate(struct option_cache **cptr, const char *file, int line)
int option_state_reference(struct option_state **ptr, struct option_state *bp, const char *file, int line)
union expression::expr_union data
int option_state_allocate(struct option_state **ptr, const char *file, int line)
int option_chain_head_dereference(struct option_chain_head **ptr, const char *file, int line)
int packet_reference(struct packet **ptr, struct packet *bp, const char *file, int line)
int buffer_allocate(struct buffer **ptr, unsigned len, const char *file, int line)
struct class * classes[PACKET_MAX_CLASSES]
struct interface_info * interface
int binding_scope_allocate(struct binding_scope **ptr, const char *file, int line)
int group_dereference(struct group **ptr, const char *file, int line)
int group_allocate(struct group **ptr, const char *file, int line)
void dfree(void *ptr, const char *file, int line)
struct binding_value * free_binding_values
struct expression * free_expressions
struct option * new_option(char *name, const char *file, int line) const
int option_chain_head_reference(struct option_chain_head **ptr, struct option_chain_head *bp, const char *file, int line)
struct dhcp_packet * dhcp_free_list
void free_client_lease(struct client_lease *lease, const char *file, int line)
struct packet * packet_free_list
union binding_value::value value
struct universe ** universes
int option_state_dereference(struct option_state **ptr, const char *file, int line)
int binding_scope_reference(struct binding_scope **ptr, struct binding_scope *bp, const char *file, int line)
void free_protocol(struct protocol *ptr, const char *file, int line)
void free_pair(pair foo, const char *file, int line)
int packet_dereference(struct packet **ptr, const char *file, int line)
int packet_allocate(struct packet **ptr, const char *file, int line)
void * dmalloc(unsigned size, const char *file, int line)
int option_chain_head_allocate(struct option_chain_head **ptr, const char *file, int line)
void free_expression(struct expression *expr, const char *file, int line)
struct client_lease * new_client_lease(char *file, int line) const
#define dmalloc_reuse(x, y, l, z)
struct protocol * new_protocol(char *file, int line) const
int expression_reference(struct expression **ptr, struct expression *src, const char *file, int line)
int dns_host_entry_allocate(struct dns_host_entry **ptr, const char *hostname, const char *file, int line)
int dns_host_entry_dereference(struct dns_host_entry **ptr, const char *file, int line)
struct binding_value * bv
int dns_zone_allocate(struct dns_zone **ptr, const char *file, int line)
const unsigned char * data
void data_string_copy(struct data_string *dest, const struct data_string *src, const char *file, int line)
void free_binding_value(struct binding_value *bv, const char *file, int line)
int dns_host_entry_reference(struct dns_host_entry **ptr, struct dns_host_entry *bp, const char *file, int line)
struct dhcp_packet * new_dhcp_packet(char *file, int line) const
#define PACKET_MAX_CLASSES
void free_dhcp_packet(struct dhcp_packet *ptr, const char *file, int line)
int buffer_dereference(struct buffer **ptr, const char *file, int line)