21 for (i = 0; i < nchars; i++) {
23 if (c < 0x20 || c > 0x7e) {
52#ifdef DUK_USE_REFERENCE_COUNTING
56 (
const char *) duk__get_heap_type_string(obj),
64 (
const char *) duk__get_heap_type_string(obj),
92 duk__dump_indented(curr, count);
107 (
long) (((
double) heap->
st_used) / ((
double) heap->
st_size) * 100.0)));
117 duk__sanitize_snippet(buf,
sizeof(buf), e);
119#ifdef DUK_USE_REFERENCE_COUNTING
120 DUK_D(
DUK_DPRINT(
" [%ld]: %p (flags: 0x%08lx, ref: %ld) '%s', strhash=0x%08lx, blen=%ld, clen=%ld, "
121 "arridx=%ld, internal=%ld, reserved_word=%ld, strict_reserved_word=%ld, eval_or_arguments=%ld",
127 (
unsigned long) e->hash,
136 DUK_D(
DUK_DPRINT(
" [%ld]: %p (flags: 0x%08lx) '%s', strhash=0x%08lx, blen=%ld, clen=%ld, "
137 "arridx=%ld, internal=%ld, reserved_word=%ld, strict_reserved_word=%ld, eval_or_arguments=%ld",
167 (
long) i, (
long) c->
bidx, (
long) c->
cidx));
169 duk__sanitize_snippet(buf,
sizeof(buf), c->
h);
171 (
long) i, (
long) c->
bidx, (
long) c->
cidx, (
const char *) buf));
185#ifdef DUK_USE_GCC_PRAGMAS
186#pragma GCC diagnostic push
187#pragma GCC diagnostic ignored "-pedantic"
189 duk_debug_format_funcptr(buf,
sizeof(buf), (duk_uint8_t *) &heap->
alloc_func,
sizeof(heap->
alloc_func));
193 duk_debug_format_funcptr(buf,
sizeof(buf), (duk_uint8_t *) &heap->
free_func,
sizeof(heap->
free_func));
195 duk_debug_format_funcptr(buf,
sizeof(buf), (duk_uint8_t *) &heap->
fatal_func,
sizeof(heap->
fatal_func));
197#ifdef DUK_USE_GCC_PRAGMAS
198#pragma GCC diagnostic pop
203#ifdef DUK_USE_MARK_AND_SWEEP
204#ifdef DUK_USE_VOLUNTARY_GC
229 duk__dump_strcache(heap);
231 duk__dump_heaphdr_list(heap, heap->
heap_allocated,
"heap allocated");
233#ifdef DUK_USE_REFERENCE_COUNTING
234 duk__dump_heaphdr_list(heap, heap->
refzero_list,
"refcounting refzero list");
237#ifdef DUK_USE_MARK_AND_SWEEP
238 duk__dump_heaphdr_list(heap, heap->
finalize_list,
"mark-and-sweep finalize list");
241 duk__dump_stringtable(heap);
duk_int_fast32_t duk_int_t
#define DUK_MEMZERO(p, n)
duk_uint32_t duk_uint_fast32_t
#define DUK_STRTAB_DELETED_MARKER(heap)
#define DUK_HSTRING_GET_DATA(x)
#define DUK_HEAPHDR_GET_TYPE(h)
#define DUK_HSTRING_HAS_RESERVED_WORD(x)
#define DUK_HEAPHDR_GET_REFCOUNT(h)
#define DUK_HEAPHDR_GET_FLAGS(h)
#define DUK_HSTRING_HAS_EVAL_OR_ARGUMENTS(x)
#define DUK_HSTRING_HAS_INTERNAL(x)
#define DUK_HEAP_STRCACHE_SIZE
#define DUK_HSTRING_HAS_ARRIDX(x)
#define DUK_HSTRING_HAS_STRICT_RESERVED_WORD(x)
#define DUK_HEAPHDR_GET_NEXT(heap, h)
duk_heaphdr * finalize_list
duk_heaphdr * refzero_list
duk_int_t call_recursion_limit
duk_int_t mark_and_sweep_trigger_counter
duk_hthread * curr_thread
duk_strcache strcache[DUK_HEAP_STRCACHE_SIZE]
duk_hthread * heap_thread
duk_fatal_function fatal_func
duk_int_t mark_and_sweep_recursion_depth
duk_realloc_function realloc_func
duk_bool_t handling_error
duk_small_uint_t mark_and_sweep_base_flags
duk_hobject * heap_object
duk_free_function free_func
duk_int_t call_recursion_depth
duk_alloc_function alloc_func
duk_heaphdr * heap_allocated