yumapro  20.10-12
YumaPro SDK
heapchk.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3  * Copyright (c) 2012 - 2021, YumaWorks, Inc., All Rights Reserved.
4  *
5  * Unless required by applicable law or agreed to in writing,
6  * software distributed under the License is distributed on an
7  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8  * KIND, either express or implied. See the License for the
9  * specific language governing permissions and limitations
10  * under the License.
11  */
12 #ifndef _H_heapchk
13 #define _H_heapchk
14 
15 /* FILE: heapchk.h
16 *********************************************************************
17 * *
18 * P U R P O S E *
19 * *
20 *********************************************************************/
21 
27 /*********************************************************************
28 * *
29 * C H A N G E H I S T O R Y *
30 * *
31 *********************************************************************
32 
33 date init comment
34 ----------------------------------------------------------------------
35 2013-01-14 mts begun
36 
37 *********************************************************************/
38 
39 #ifndef _H_log
40 #include "log.h"
41 #endif
42 
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
48 /********************************************************************
49 * *
50 * F U N C T I O N S *
51 * *
52 *********************************************************************/
53 
54 extern uint heapcheck_bad_csum_cnt;
55 
56 /********************************************************************
57 * *
58 * F U N C T I O N S *
59 * *
60 *********************************************************************/
61 
76 extern void heapcheck_init (void);
77 
85 extern void heapcheck_report (boolean use_logger,
86  log_debug_t level,
87  const char *label);
88 
94 extern void heapcheck_set_hold_free (boolean hold);
95 
101 extern void heapcheck_release_held_free (boolean hold);
102 
103 #ifdef HEAP_CHECKING
104  //extern void *malloc_checker ( size_t size ); /* Defined by procdefs.h */
105  //extern void free_checker ( void *usrP ); /* Defined by procdefs.h */
106 extern void check_all_checksums( void );
107 #endif
108 
109 
112 #ifdef __cplusplus
113 } /* end extern 'C' */
114 #endif
115 
116 #endif /* _H_heapchk */
log_error
void log_error(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_ERROR log entry.
ERR_HEAPCHK_ERR
@ ERR_HEAPCHK_ERR
016
Definition: status_enum.h:206
heapcheck_report
void heapcheck_report(boolean use_logger, log_debug_t level, const char *label)
Generate a heap check report.
heapcheck_release_held_free
void heapcheck_release_held_free(boolean hold)
Internal release held free Do not use.
log_info
void void void void void log_info(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_INFO log entry.
dlq_createSQue
void dlq_createSQue(dlq_hdrT *queAddr)
create a static queue header
Definition: dlq.c:177
log_warn
void void void log_warn(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_WARN log entry.
heapchk.h
Internal Heap Checking Utilities.
LOG_DEBUG_WARN
@ LOG_DEBUG_WARN
all errors + warnings
Definition: log.h:391
dlq_remove
void dlq_remove(void *nodeP)
remove the queue entry from its queue list entry MUST have been enqueued somehow before this function...
Definition: dlq.c:519
dlq_onQueue
boolean dlq_onQueue(const dlq_hdrT *nodeP)
Determine where a data node header is on a queue or not.
Definition: dlq.c:1039
dlq_nextEntry
#define dlq_nextEntry(nodeP)
get the next queue entry after the current entry
Definition: dlq.h:265
LOG_DEBUG_ERROR
@ LOG_DEBUG_ERROR
fatal + internal errors only
Definition: log.h:390
log.h
NCX System Logging Manager.
log_flush
void log_flush(void)
Flush output buffers.
Definition: log.c:1880
log_error_append
void void log_error_append(const char *fstr,...) __attribute__((format(printf
Append to a LOG_DEBUG_ERROR log entry.
dlq_deque
void * dlq_deque(dlq_hdrT *listP)
remove the first queue node from the queue list
Definition: dlq.c:286
dlq_empty
#define dlq_empty(listP)
check if queue list is empty
Definition: dlq.h:367
thd.h
Thread support (for now limited to netconfd)
heapcheck_set_hold_free
void heapcheck_set_hold_free(boolean hold)
Internal function do not use.
dlq_firstEntry
#define dlq_firstEntry(listP)
get the first entry in the queue list
Definition: dlq.h:337
LOG_DEBUG_INFO
@ LOG_DEBUG_INFO
all previous + user info trace
Definition: log.h:392
dlq_enque
void dlq_enque(REG void *newP, REG dlq_hdrT *listP)
add a queue node to the end of a queue list Add newP to listP
Definition: dlq.c:246
SET_ERROR
#define SET_ERROR(E)
macro SET_ERROR
Definition: status_enum.h:103
heapcheck_init
void heapcheck_init(void)
Initialize heap checking module.