mkernel 0.0.2
Micro-kernel framework, everything as a module
memdbg.h
Go to the documentation of this file.
1
19#ifndef __MEMDBG_H__
20#define __MEMDBG_H__
21
22#ifdef HAVE_CONFIG_H
23# include "config.h"
24#endif
25
26#include "memtrack.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
46void *dbg_malloc(const size_t Size,
47 const char *File,
48 const int Line,
49 const char *CompilDate,
50 const char *CompilTime,
51 const char *Function);
52
71void dbg_free(void *Ptr,
72 const char *File,
73 const int Line,
74 const char *CompilDate,
75 const char *CompilTime,
76 const char *Function);
77
96void *dbg_calloc(const size_t NMemb,
97 const size_t Size,
98 const char *File,
99 const int Line,
100 const char *CompilDate,
101 const char *CompilTime,
102 const char *Function);
103
132void *dbg_realloc(void *Ptr,
133 const size_t Size,
134 const char *File,
135 const int Line,
136 const char *CompilDate,
137 const char *CompilTime,
138 const char *Function);
139
154char *dbg_strdup(const char *Ptr,
155 const char *File,
156 const int Line,
157 const char *CompilDate,
158 const char *CompilTime,
159 const char *Function);
160
177int dbg_asprintf(char **p_Ptr,
178 const char *p_Format,
179 const char *File,
180 const int Line,
181 const char *CompilDate,
182 const char *CompilTime,
183 const char *Function,
184 ...);
185
186#ifdef __cplusplus
187}
188#endif
189
190#endif /* __MEMDBG_H__ */
191
void * dbg_malloc(const size_t Size, const char *File, const int Line, const char *CompilDate, const char *CompilTime, const char *Function)
Malloc compatible standard allocation.
Definition: memdbg.c:25
void * dbg_calloc(const size_t NMemb, const size_t Size, const char *File, const int Line, const char *CompilDate, const char *CompilTime, const char *Function)
Allocate a table of item from the size of each and number.
Definition: memdbg.c:83
void * dbg_realloc(void *Ptr, const size_t Size, const char *File, const int Line, const char *CompilDate, const char *CompilTime, const char *Function)
Resize an already allocated and tracked block.
Definition: memdbg.c:109
int dbg_asprintf(char **p_Ptr, const char *p_Format, const char *File, const int Line, const char *CompilDate, const char *CompilTime, const char *Function,...)
Build a formatted string with allocation.
Definition: memdbg.c:203
void dbg_free(void *Ptr, const char *File, const int Line, const char *CompilDate, const char *CompilTime, const char *Function)
Free compatible standard memory release.
Definition: memdbg.c:59
char * dbg_strdup(const char *Ptr, const char *File, const int Line, const char *CompilDate, const char *CompilTime, const char *Function)
String duplication with allocation.
Definition: memdbg.c:170
Memory block metadata tracking headers.