commands/leak/leak.cif
author Tom Sutcliffe <thomas.sutcliffe@accenture.com>
Sun, 18 Jul 2010 18:57:41 +0100
changeset 36 99de8c43cede
parent 0 7f656887cf89
child 31 d0e1c40de386
permissions -rw-r--r--
First cut of thread pools in fshell. Not fully working yet. Removed 4 overloads of CCommandBase::RunCommand[L] that are no longer used at all, and changed one more to not be exported as it's only used internally to iocli.dll. Added a thread pool (CThreadPool) to fshell so that thread commands no longer have to spawn a new thread every time they run. As part of this, CCommandWrapperBase now derives from CActive so that CThreadCommand can use its CActive-ness. CThreadCommand rejigged quite a bit to use CThreadPool (via MTaskRunner interface).

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