The Memory Management Library
0.2.1
|
contains the information about invalid memory operations. More...
#include <memory.h>
Data Fields | |
const void * | p |
size_t | size |
const char * | ifile |
const char * | ifunc |
int | iline |
const char * | afile |
const char * | afunc |
int | aline |
size_t | asize |
contains the information about invalid memory operations.
An object of the type mem_loginfo_t
is used when the information about an invalid memory operation is delivered to a user-provided log function. As explained in mem_log(), such a function must be declared to accept a mem_loginfo_t
arguments.
Its members contains three kinds of information:
p
. In the case of mem_resize(), the requested size is also available in size
.ifile
, ifunc
and iline
, respectively.afile
, afunc
, aline
and asize
provide where it was allocated and what its size was. This information is useful in tracking how such an invalid operation was made.If any of them is not available, they are set to a null pointer (for ifile
, ifunc
, afile
and afunc
) or 0 (for size
, iline
, aline
and asize
).
const char* mem_loginfo_t::afile |
file name in which storage in problem originally allocated
const char* mem_loginfo_t::afunc |
function name in which storage in problem originally allocated
line number on which storage in problem originally allocated
size_t mem_loginfo_t::asize |
size of storage in problem when allocated before
const char* mem_loginfo_t::ifile |
file name in which invalid memory operation invoked
const char* mem_loginfo_t::ifunc |
function name in which invalid memory operation invoked
line number on which invalid memory operation invoked
const void* mem_loginfo_t::p |
pointer value used in invalid memory operation
size_t mem_loginfo_t::size |
requested size; meaningful only when triggered by mem_resize()