Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Memory operations. More...
#include <memory_ops.h>
Public Types | |
enum | { Pattern_BeforeUse = 0x7a , Pattern_AfterUse = 0x7d , Pattern_Canary = 0x7b } |
Some good filler patterns for memory. If we fill memory with these values and interpret it as 16-bit or 32-bit integers, or as floats, the values will be rather high and will sound loudly when trying to play them on sound card. We use a few different patterns to make it easy to distinguish between them in debugger. More... | |
Static Public Member Functions | |
static void | poison_before_use (void *data, size_t size) |
Poison memory that is going to be used. Helps catching uninitialized access bugs. More... | |
static void | poison_after_use (void *data, size_t size) |
Poison memory that is no more used. Helps catching use after free bugs. More... | |
static void | prepare_canary (void *data, size_t size) |
Prepare canary memory. Helps catching buffer overflow/underflow bugs. More... | |
static bool | check_canary (void *data, size_t size) |
Check canary memory. More... | |
Memory operations.
Definition at line 21 of file memory_ops.h.
anonymous enum |
Some good filler patterns for memory. If we fill memory with these values and interpret it as 16-bit or 32-bit integers, or as floats, the values will be rather high and will sound loudly when trying to play them on sound card. We use a few different patterns to make it easy to distinguish between them in debugger.
Definition at line 45 of file memory_ops.h.
|
static |
Check canary memory.
|
static |
Poison memory that is no more used. Helps catching use after free bugs.
|
static |
Poison memory that is going to be used. Helps catching uninitialized access bugs.
|
static |
Prepare canary memory. Helps catching buffer overflow/underflow bugs.