18 #ifndef LIBCWD_CLASS_ALLOC_H 19 #define LIBCWD_CLASS_ALLOC_H 21 #ifndef LIBCWD_CONFIG_H 25 #ifndef LIBCWD_ENUM_MEMBLK_TYPES_H 28 #ifndef LIBCW_LOCKABLE_AUTO_PTR_H 31 #if CWDEBUG_LOCATION && !defined(LIBCWD_CLASS_LOCATION_H) 38 #ifndef LIBCWD_SMART_PTR_H 41 #ifndef LIBCW_SYS_TIME_H 42 #define LIBCW_SYS_TIME_H 131 ) : a_start(s), a_size(sz), a_memblk_type(type), type_info_ptr(&ti),
a_time(t)
151 bool is_tagged()
const {
return M_tagged; }
152 void alloctag_called() { M_tagged =
true; }
153 void reset_type_info() { type_info_ptr = &unknown_type_info_c; }
158 #endif // LIBCWD_CLASS_ALLOC_H struct timeval a_time
The time at which the memory was allocated.
Definition: class_alloc.h:67
struct timeval const & time() const
The time at which this allocation was made.
Definition: class_alloc.h:109
size_t size() const
The allocated size in bytes.
Definition: class_alloc.h:76
alloc_ct(void const *s, size_t sz, memblk_types_nt type, type_info_ct const &ti, struct timeval const &t, location_ct const *l)
Construct an alloc_ct object with attributes s, sz, type, ti, t and l.
Definition: class_alloc.h:127
A source file location.
Definition: class_location.h:88
void const * start() const
A pointer to the start of the allocated memory block.
Definition: class_alloc.h:81
char const * description() const
A pointer to a description of the allocated memory block.
Definition: class_alloc.h:102
_private_::smart_ptr a_description
A label describing this memblk.
Definition: class_alloc.h:66
type_info_ct const & type_info() const
A reference to the type info of the pointer to the allocated memory block.
Definition: class_alloc.h:95
type_info_ct const * type_info_ptr
Type info of related object.
Definition: class_alloc.h:65
Class that holds type information for debugging purposes.  Returned by type_info_of().
Definition: type_info.h:44
size_t a_size
Duplicate of (original) memblk_key_ct.
Definition: class_alloc.h:63
An object of type alloc_ct contains information about one allocated memory block. ...
Definition: class_alloc.h:60
memblk_types_nt a_memblk_type
A flag which indicates the type of allocation.
Definition: class_alloc.h:64
memblk_types_nt memblk_type() const
A flag indicating the type of allocation.
Definition: class_alloc.h:86
void const * a_start
Duplicate of (original) memblk_key_ct.
Definition: class_alloc.h:62
namespace for libcwd.
Definition: debug.cc:87
location_ct const & location() const
The source file location that the allocator was called from.
Definition: class_alloc.h:119
location_ct const * M_location
Pointer into the location cache, with the source file, function and line number from where the alloca...
Definition: class_alloc.h:69
virtual ~alloc_ct()
Destructor.
Definition: class_alloc.h:145
memblk_types_nt
A flag indicating the type of allocation.
Definition: enum_memblk_types.h:45