# 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-descriptionA tool for purposefully wasting memory.==long-descriptionSits 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-alsoL<gobble|gobble>==argument int amount optionalThe target amount of memory to consume (in bytes). If not specified attempts to consumes all available memory.==option bool v verboseDisplay more detailed output.==option int i increment-amountThe 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 rateThe amount of time (in milliseconds) to wait between each increment. Defaults to zero (i.e. no wait).==option bool H heapUse a ChunkHeap to consume the memory rather than a straight RChunk.==option bool t retryIf specified, when an allocation fails retry using a smaller increment amount.==option bool l logging-allocatorIf specified, install the logging allocator before starting to leak memory. Assumes the C<--heap> option.==copyrightCopyright (c) 2007-2010 Accenture. All rights reserved.