SYNTAX

    leak [options] [<amount>]


OPTIONS

-h (--help) bool

Display help.

-v (--verbose) bool

Display more detailed output.

-i (--increment-amount) int

The number of bytes to leak on each increment. If not specified and a target amount is specified, tries to allocate the entire target amount in one go. If not specified and a target amount isn't specified either, defaults to 4096 bytes. Note that unless --heap is used, the increment amount must be a multiple of 4096 bytes.

-r (--rate) uint

The amount of time (in milliseconds) to wait between each increment. Defaults to zero (i.e. no wait).

-H (--heap) bool

Use a ChunkHeap to consume the memory rather than a straight RChunk.

-t (--retry) bool

If specified, when an allocation fails retry using a smaller increment amount.

-l (--logging-allocator) bool

If specified, install the logging allocator before starting to leak memory. Assumes the --heap option.


ARGUMENTS

[<amount>]

The target amount of memory to consume (in bytes). If not specified attempts to consumes all available memory. [int]


DESCRIPTION

A tool for purposefully wasting memory.

Sits in a loop allocating memory. This continues until either the specified amount of memory has been consumed, or an error occurs. The allocations are not done in the main application heap, rather the from a raw RChunk (the default), or via an RHeap (User::ChunkHeap()) if the --heap option is given. The command waits for a keypress before exiting and freeing the memory.


SEE ALSO

gobble


COPYRIGHT

Copyright (c) 2007-2010 Accenture. All rights reserved.