Main Page   Reference Manual   Namespace List   Compound List   Namespace Members   Compound Members   File Members  

libcwd/debugmalloc.h File Reference

#include <libcwd/config.h>
#include <libcwd/macro_AllocTag.h>
#include <cstddef>
#include <libcwd/class_alloc.h>
#include <libcwd/lockable_auto_ptr.h>
#include <libcwd/private_set_alloc_checking.h>
#include <libcwd/enum_memblk_types.h>
#include <libcwd/class_marker.h>
#include <libcwd/class_alloc_filter.h>
#include <sys/time.h>

Include dependency graph for debugmalloc.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  libcwd

Enumerations

enum  libcwd::malloc_report_nt { libcwd::malloc_report }
 Type of malloc_report. More...

Functions

size_t libcwd::mem_size (void)
 Returns the total number of allocated bytes.
unsigned long libcwd::mem_blocks (void)
 Returns the total number of allocated memory blocks.
alloc_ct const * libcwd::find_alloc (void const *ptr)
 Find information about a memory allocation.

Given a pointer, which points to the start of or inside an allocated memory block, it is possible to find information about this memory block using the libcwd function find_alloc.

bool libcwd::test_delete (void const *void_ptr)
 Test if a pointer points to the start of an allocated memory block.
void libcwd::make_invisible (void const *void_ptr)
 Make allocation pointed to by ptr invisible.

The allocation pointed to by ptr is made invisible; it won't show up anymore in the overview of allocated memory.

void libcwd::make_all_allocations_invisible_except (void const *ptr)
 Make all current allocations invisible except the given pointer.

All allocations, except the given pointer, are made invisible; they won't show up anymore in the overview of allocated memory.

void libcwd::make_exit_function_list_invisible (void)
 Make allocations done in libc.so:__new_exitfn invisible.

This makes the allocation done in __new_exitfn (libc.so) invisible because it is not freed until after all __cxa_atexit functions have been called and would therefore always falsely trigger a memory leak detection. This function can be called first thing in main().

void libcwd::set_invisible_on (void)
 Make all future allocations invisible.

All following allocations are made invisible; they won't show up anymore in the overview of allocated memory.

void libcwd::set_invisible_off (void)
 Cancel a call to set_invisible_on.

See set_invisible_on.

void libcwd::move_outside (marker_ct *marker, void const *void_ptr)
 Move memory allocation pointed to by ptr outside marker.
unsigned long libcwd::list_allocations_on (debug_ct &debug_object, alloc_filter_ct const &filter)
 List all current allocations to a given debug object using a specified format.

With CWDEBUG_ALLOC set to 1, it is possible to write the overview of allocated memory to a Debug Object.

unsigned long libcwd::list_allocations_on (debug_ct &debug_object)
 List all current allocations to a given debug object.

With CWDEBUG_ALLOC set to 1, it is possible to write the overview of allocated memory to a Debug Object.


Detailed Description

Do not include this header file directly, instead include debug.h.
Copyright © 2001 - 2004 Carlo Wood.  All rights reserved.