commands/leak/leak.cif
author Tom Sutcliffe <thomas.sutcliffe@accenture.com>
Wed, 23 Jun 2010 15:52:26 +0100
changeset 0 7f656887cf89
child 31 d0e1c40de386
permissions -rw-r--r--
First submission to Symbian Foundation staging server.

# 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 can be configured to come from a raw RChunk, or via an RHeap (C<User::ChunkHeap()>). 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 uint a address

The address of a heap to leak into. The value should be in the address space of the process given by the C<--processid> option.

==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.

==copyright

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