Documentation of memory

( foonathan/memory)

debugging.hpp File Reference

Detailed Description

Debugging facilities.

Typedefs

using leak_handler = void(*)(const allocator_info &info, std::ptrdiff_t amount)
 The type of the handler called when a memory leak is detected. More...
 
using invalid_pointer_handler = void(*)(const allocator_info &info, const void *ptr)
 The type of the handler called when an invalid pointer is passed to a deallocation function. More...
 
using buffer_overflow_handler = void(*)(const void *memory, std::size_t size, const void *write_ptr)
 The type of the handler called when a buffer under/overflow is detected. More...
 

Enumerations

enum  debug_magic : unsigned char {
  internal_memory, internal_freed_memory, new_memory, freed_memory,
  alignment_memory, fence_memory
}
 The magic values that are used for debug filling. More...
 

Functions

leak_handler set_leak_handler (leak_handler h)
 Exchanges the leak_handler. More...
 
leak_handler get_leak_handler ()
 Returns the leak_handler. More...
 
invalid_pointer_handler set_invalid_pointer_handler (invalid_pointer_handler h)
 Exchanges the invalid_pointer_handler. More...
 
invalid_pointer_handler get_invalid_pointer_handler ()
 Returns the invalid_pointer_handler. More...
 
buffer_overflow_handler set_buffer_overflow_handler (buffer_overflow_handler h)
 Exchanges the buffer_overflow_handler. More...
 
buffer_overflow_handler get_buffer_overflow_handler ()
 Returns the buffer_overflow_handler. More...