3 Definitions for the object management API protocol memory allocation... */
6 * Copyright (c) 1996-1999 Internet Software Consortium.
7 * Use is subject to license terms which appear in the file named
8 * ISC-LICENSE that should have accompanied this file when you
9 * received it. If a file named ISC-LICENSE did not accompany this
10 * file, or you are not sure the one you have is correct, you may
11 * obtain an applicable copy of the license at:
13 * http://www.isc.org/isc-license-1.0.html.
15 * This file is part of the ISC DHCP distribution. The documentation
16 * associated with this file is listed in the file DOCUMENTATION,
17 * included in the top-level directory of this release.
19 * Support and other services are available for ISC products - see
20 * http://www.isc.org for more information.
23 isc_result_t
omapi_buffer_new (omapi_buffer_t
**, const char *, int);
24 isc_result_t
omapi_buffer_reference (omapi_buffer_t
**,
25 omapi_buffer_t
*, const char *, int);
26 isc_result_t
omapi_buffer_dereference (omapi_buffer_t
**, const char *, int);
28 #if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL)
29 #define DMDOFFSET (sizeof (struct dmalloc_preamble))
32 #define DMDSIZE (DMDOFFSET + DMLFSIZE + DMUFSIZE)
34 struct dmalloc_preamble
{
35 struct dmalloc_preamble
*prev
, *next
;
39 unsigned long generation
;
40 unsigned char low_fence
[DMLFSIZE
];
47 #if defined (DEBUG_RC_HISTORY)
48 #if !defined (RC_HISTORY_MAX)
49 # define RC_HISTORY_MAX 256
52 struct rc_history_entry
{
60 #define rc_register(x, l, r, y, z) do { \
61 rc_history [rc_history_index].file = (x); \
62 rc_history [rc_history_index].line = (l); \
63 rc_history [rc_history_index].reference = (r); \
64 rc_history [rc_history_index].addr = (y); \
65 rc_history [rc_history_index].refcnt = (z); \
66 if (++rc_history_index == RC_HISTORY_MAX) \
67 rc_history_index = 0;\
69 #define rc_register_mdl(r, y, z) \
70 rc_register (__FILE__, __LINE__, r, y, z)
72 #define rc_register(file, line, reference, addr, refcnt)
73 #define rc_register_mdl(reference, addr, refcnt)
76 #if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL)
77 extern struct dmalloc_preamble
*dmalloc_list
;
78 extern unsigned long dmalloc_outstanding
;
79 extern unsigned long dmalloc_longterm
;
80 extern unsigned long dmalloc_generation
;
81 extern unsigned long dmalloc_cutoff_generation
;
84 #if defined (DEBUG_RC_HISTORY)
85 extern struct rc_history_entry rc_history
[RC_HISTORY_MAX
];
86 extern int rc_history_index
;