unilink  0.4.3
A simple C++ library for unified async communication
memory_validator.hpp File Reference
#include <cstdint>
#include <cstring>
#include <memory>
#include <stdexcept>
#include <vector>
#include "unilink/base/visibility.hpp"

Go to the source code of this file.

Classes

class  unilink::memory::MemoryValidator
 RAII wrapper for memory validation. More...
 
class  unilink::memory::MemoryPatternGenerator
 Memory pattern generator for testing. More...
 

Namespaces

 
 
 

Functions

bool unilink::memory::memory_validator::is_memory_accessible (const void *ptr, size_t size)
 Validate memory region accessibility. More...
 
bool unilink::memory::memory_validator::is_memory_aligned (const void *ptr, size_t alignment)
 Validate memory alignment. More...
 
bool unilink::memory::memory_validator::check_buffer_bounds (const void *ptr, size_t size, size_t canary_size=8)
 Check for buffer overflow/underflow patterns. More...
 
void unilink::memory::memory_validator::initialize_canary_bytes (void *ptr, size_t size, size_t canary_size=8)
 Initialize canary bytes around buffer. More...
 
bool unilink::memory::memory_validator::validate_canary_bytes (const void *ptr, size_t size, size_t canary_size=8)
 Validate canary bytes around buffer. More...
 
void unilink::memory::memory_validator::safe_memcpy_validated (void *dest, const void *src, size_t size)
 Safe memory copy with comprehensive validation. More...
 
void unilink::memory::memory_validator::safe_memmove_validated (void *dest, const void *src, size_t size)
 Safe memory move with comprehensive validation. More...
 
void unilink::memory::memory_validator::safe_memset_validated (void *ptr, int value, size_t size)
 Safe memory set with comprehensive validation. More...
 
bool unilink::memory::memory_validator::is_double_free (void *ptr)
 Check for double-free conditions. More...
 
bool unilink::memory::memory_validator::is_use_after_free (const void *ptr)
 Check for use-after-free conditions. More...