Github User Fetcher 1.0.0
C Application with Server and GUI
|
#include <stdio.h>
#include <stdlib.h>
#include "duktape.h"
Go to the source code of this file.
Data Structures | |
struct | alloc_hdr |
Functions | |
static void | sandbox_dump_memstate (void) |
static void * | sandbox_alloc (void *udata, duk_size_t size) |
static void * | sandbox_realloc (void *udata, void *ptr, duk_size_t size) |
static void | sandbox_free (void *udata, void *ptr) |
static duk_ret_t | do_sandbox_test (duk_context *ctx) |
static void | sandbox_fatal (duk_context *ctx, duk_errcode_t code, const char *msg) |
int | main (int argc, char *argv[]) |
Variables | |
static size_t | total_allocated = 0 |
static size_t | max_allocated = 256 * 1024 |
|
static |
Definition at line 147 of file duktape-1.5.2/examples/sandbox/sandbox.c.
References duk_call(), duk_compile, duk_concat(), DUK_ERR_ERROR, duk_error, duk_eval_string, duk_get_top(), duk_insert(), duk_push_lstring(), duk_require_string(), duk_set_global_object(), and fread().
Referenced by main().
int main | ( | int | argc, |
char * | argv[] ) |
Definition at line 222 of file duktape-1.5.2/examples/sandbox/sandbox.c.
References do_sandbox_test(), duk_create_heap(), duk_destroy_heap(), duk_push_string(), duk_safe_call(), duk_safe_to_string, NULL, sandbox_alloc(), sandbox_fatal(), sandbox_free(), sandbox_realloc(), and total_allocated.
|
static |
Definition at line 40 of file duktape-1.5.2/examples/sandbox/sandbox.c.
References malloc, max_allocated, NULL, sandbox_dump_memstate(), alloc_hdr::sz, total_allocated, and alloc_hdr::u.
Referenced by main().
|
static |
Definition at line 33 of file duktape-1.5.2/examples/sandbox/sandbox.c.
References total_allocated.
Referenced by sandbox_alloc(), sandbox_free(), and sandbox_realloc().
|
static |
Definition at line 215 of file duktape-1.5.2/examples/sandbox/sandbox.c.
Referenced by main().
|
static |
Definition at line 129 of file duktape-1.5.2/examples/sandbox/sandbox.c.
References free, sandbox_dump_memstate(), alloc_hdr::sz, total_allocated, and alloc_hdr::u.
Referenced by main().
|
static |
Definition at line 66 of file duktape-1.5.2/examples/sandbox/sandbox.c.
References free, malloc, max_allocated, NULL, realloc, sandbox_dump_memstate(), alloc_hdr::sz, total_allocated, and alloc_hdr::u.
Referenced by main().
|
static |
Definition at line 31 of file duktape-1.5.2/examples/sandbox/sandbox.c.
Referenced by sandbox_alloc(), and sandbox_realloc().
|
static |
Definition at line 30 of file duktape-1.5.2/examples/sandbox/sandbox.c.
Referenced by main(), sandbox_alloc(), sandbox_dump_memstate(), sandbox_free(), and sandbox_realloc().