commands/leak/leak.cif
author Tom Sutcliffe <thomas.sutcliffe@accenture.com>
Tue, 07 Dec 2010 17:29:09 +0000
changeset 90 ceac7084e2e5
parent 59 c9dfb364c2d1
permissions -rw-r--r--
Implemented RObjectIx-based memoryaccess APIs. Upshot is that objinfo now works again on platforms that define FSHELL_NO_DOBJECTIX_SUPPORT.

# leak.cif
# 
# Copyright (c) 2010 Accenture. All rights reserved.
# This component and the accompanying materials are made available
# under the terms of the "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
# 
# Initial Contributors:
# Accenture - Initial contribution
#

==name leak

==short-description

A tool for purposefully wasting memory.

==long-description

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 (C<User::ChunkHeap()>) if the C<--heap> option is given. The command waits for a keypress before exiting and freeing the memory.

==see-also

L<gobble|gobble>

==argument int amount optional

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

==option bool v verbose

Display more detailed output.

==option int i increment-amount

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 C<--heap> is used, the increment amount must be a multiple of 4096 bytes.

==option uint r rate

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

==option bool H heap

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

==option bool t retry

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

==option bool l logging-allocator

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

==copyright

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