memory
Typedefs | Enumerations | Functions
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.
 
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.
 
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.
 

Enumerations

enum class  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.
 
leak_handler get_leak_handler ()
 Returns the leak_handler.
 
invalid_pointer_handler set_invalid_pointer_handler (invalid_pointer_handler h)
 Exchanges the invalid_pointer_handler.
 
invalid_pointer_handler get_invalid_pointer_handler ()
 Returns the invalid_pointer_handler.
 
buffer_overflow_handler set_buffer_overflow_handler (buffer_overflow_handler h)
 Exchanges the buffer_overflow_handler.
 
buffer_overflow_handler get_buffer_overflow_handler ()
 Returns the buffer_overflow_handler.