Documentation
¶
Overview ¶
Allocator simulates memory allocation user library such as malloc(3). It demonstrates basics of managing free memory lists.
SYNOPSIS
allocator [-base num] [-bounds num] [-n num] [-c noop|forward]
EXAMPLE
% allocator/ -base 1024 -size 2048 -n 10 -c forward
configuration:
base: 1024 size: 2048 coalesce: forward
[1] free blocks 2046:1026
trace:
malloc(225)
[1] allocations 1026
[1] free blocks 1819:1253
malloc(326)
[2] allocations 1026 1253
[1] free blocks 1491:1581
free(1026)
[1] allocations 1253
[2] free blocks 225:1026 1491:1581
malloc(1892) malloc(1892): insufficient memory
free(1253)
[0] allocations
[2] free blocks 225:1026 1819:1253
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
heap
Package heap emulates memory allocations, with API simulat to malloc(3).
|
Package heap emulates memory allocations, with API simulat to malloc(3). |
|
report
Package report generates a report for the allocator simulation.
|
Package report generates a report for the allocator simulation. |
|
sim
Package sim simulates client application working with the heap using malloc(3) API: malloc() and free().
|
Package sim simulates client application working with the heap using malloc(3) API: malloc() and free(). |
Click to show internal directories.
Click to hide internal directories.