bloat

OS/161 Reference Manual

Name

bloat - waste memory

Synopsis

/testbin/bloat [-a allocs] [-b bias] [-p touchpages]

Description

bloat allocates all available memory one page at a time until it runs out. Unlike other tests that do this, it has been gimmicked up so that it runs in a fairly reasonable amount of time even when swapping.

It runs in cycles; every cycle it allocates allocs pages, one at a time, by calling sbrk (not malloc), then touches touchpages pages. It chooses the pages it touches as follows:

The default settings are 4 allocs, 8 touchpages and a bias of 8. This gives reasonable performance with reasonable amounts of memory on the solution set. There are enough things affecting the speed that you may want to experiment with the settings when testing on your own VM system.

Requirements

bloat uses the following system calls:

bloat should work once you have implemented your VM system and added the sbrk system call. It may not run fast by default, but it should always be faster than sbrktest 10 or the notoriously glacial malloctest 3.