Github User Fetcher 1.0.0
C Application with Server and GUI
|
#include "duktape.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | alloc_hdr |
Macros | |
#define | RED_ZONE_SIZE 16 |
#define | RED_ZONE_BYTE 0x5a |
#define | INIT_BYTE 0xa5 |
#define | WIPE_BYTE 0x27 |
Functions | |
static void | check_red_zone (alloc_hdr *hdr) |
void * | duk_alloc_torture (void *udata, duk_size_t size) |
void * | duk_realloc_torture (void *udata, void *ptr, duk_size_t size) |
void | duk_free_torture (void *udata, void *ptr) |
#define INIT_BYTE 0xa5 |
Definition at line 22 of file duktape-1.5.2/examples/alloc-torture/duk_alloc_torture.c.
Referenced by duk_alloc_torture(), and duk_realloc_torture().
#define RED_ZONE_BYTE 0x5a |
Definition at line 21 of file duktape-1.5.2/examples/alloc-torture/duk_alloc_torture.c.
Referenced by check_red_zone(), duk_alloc_torture(), and duk_realloc_torture().
#define RED_ZONE_SIZE 16 |
Definition at line 20 of file duktape-1.5.2/examples/alloc-torture/duk_alloc_torture.c.
Referenced by check_red_zone(), duk_alloc_torture(), duk_free_torture(), and duk_realloc_torture().
#define WIPE_BYTE 0x27 |
Definition at line 23 of file duktape-1.5.2/examples/alloc-torture/duk_alloc_torture.c.
Referenced by duk_free_torture(), and duk_realloc_torture().
|
static |
Definition at line 36 of file duktape-1.5.2/examples/alloc-torture/duk_alloc_torture.c.
References RED_ZONE_BYTE, RED_ZONE_SIZE, alloc_hdr::sz, and alloc_hdr::u.
Referenced by duk_free_torture(), and duk_realloc_torture().
void * duk_alloc_torture | ( | void * | udata, |
duk_size_t | size ) |
Definition at line 73 of file duktape-1.5.2/examples/alloc-torture/duk_alloc_torture.c.
References INIT_BYTE, malloc, NULL, RED_ZONE_BYTE, and RED_ZONE_SIZE.
Referenced by create_duktape_heap(), and create_duktape_heap().
void duk_free_torture | ( | void * | udata, |
void * | ptr ) |
Definition at line 166 of file duktape-1.5.2/examples/alloc-torture/duk_alloc_torture.c.
References check_red_zone(), free, RED_ZONE_SIZE, and WIPE_BYTE.
Referenced by create_duktape_heap(), and create_duktape_heap().
void * duk_realloc_torture | ( | void * | udata, |
void * | ptr, | ||
duk_size_t | size ) |
Definition at line 98 of file duktape-1.5.2/examples/alloc-torture/duk_alloc_torture.c.
References check_red_zone(), free, INIT_BYTE, malloc, NULL, RED_ZONE_BYTE, RED_ZONE_SIZE, and WIPE_BYTE.
Referenced by create_duktape_heap(), and create_duktape_heap().