malloc-info

Synopsis

(malloc-info)

Parameters

Description

This procedure displays all currently allocated memory areas with their size, reference counter and the original code location from where it has been allocated initially. The output is on UNIX stderr thus bypassing the current setting of current-error-port.

Side Effects

Return Value

unspecified (ok)

See Also

Example

This is how a typical output may look like:

> (malloc-info)
total_allocated_areas = 6
total_allocated_bytes = 4596736
sizeof(MEMAREA)       = 56
-> size=     32768 reference_counter=         1 file=              atom.c line=       167
-> size=   2097152 reference_counter=         1 file=              heap.c line=        88
-> size=   2097152 reference_counter=         1 file=              heap.c line=        86
-> size=     17408 reference_counter=         1 file=              heap.c line=        60
-> size=    139264 reference_counter=         1 file=              heap.c line=        54
-> size=    212992 reference_counter=         1 file=              atom.c line=        62
ok
> (graymap-create 1000 1000)
#<graymap(16) orow:-1 ocol:-1 xres:-1 yres:-1 w:1000 h:1000>
> (malloc-info)
total_allocated_areas = 8
total_allocated_bytes = 6596768
sizeof(MEMAREA)       = 56
-> size=   2000000 reference_counter=         1 file=          graphics.c line=       125
-> size=        32 reference_counter=         1 file=          graphics.c line=       115
-> size=     32768 reference_counter=         1 file=              atom.c line=       167
-> size=   2097152 reference_counter=         1 file=              heap.c line=        88
-> size=   2097152 reference_counter=         1 file=              heap.c line=        86
-> size=     17408 reference_counter=         1 file=              heap.c line=        60
-> size=    139264 reference_counter=         1 file=              heap.c line=        54
-> size=    212992 reference_counter=         1 file=              atom.c line=        62
ok
> (gc)
ok
> (malloc-info)
total_allocated_areas = 6
total_allocated_bytes = 4596736
sizeof(MEMAREA)       = 56
-> size=     32768 reference_counter=         1 file=              atom.c line=       167
-> size=   2097152 reference_counter=         1 file=              heap.c line=        88
-> size=   2097152 reference_counter=         1 file=              heap.c line=        86
-> size=     17408 reference_counter=         1 file=              heap.c line=        60
-> size=    139264 reference_counter=         1 file=              heap.c line=        54
-> size=    212992 reference_counter=         1 file=              atom.c line=        62
ok
>