OSGetForegroundBucketFreeArea

Syntax

#include <cafe/os.h>

BOOL OSGetForegroundBucketFreeArea(void ** appRetArea, u32 * apRetSizeBytes);

Parameters

appRetArea Pointer to pointer into which to return address of foreground "bucket" free area. Argument may be NULL.
apRetSizeBytes Pointer to u32 into which to return size of foreground "bucket" free area. Argument may be NULL.

Return Values

Returns TRUE if the calling process is in the foreground, in which case the return arguments are valid. Returns FALSE if the calling process is not in the foreground.

Description

This function is used to retrieve the address and size of the foreground bucket free memory area.

The foreground bucket is a memory area that is only available to the process which currently is in the foreground. When the foreground is released (via OSReleaseForeground), the bucket area is cleared and is made available to the process that has moved into the foreground.

For a given SDK, the bucket virtual address and size remains consistent each time a process is in the foreground.

The foreground area is divided into two regions. One region, called the free area, is 40 MB and is exclusively for use by the foreground application. This function return this memory area. The second region, called the save area, is 24 MB and is reserved for system use.

Do Not Call From

None.

See Also

Foreground Bucket
APP_IN_FOREGROUND
OSGetCallArgs
OSGetForegroundBucket
OSGetSystemMessageQueue
OSReleaseForeground
OSSavesDone_ReadyToRelease
OSSendAppSwitchRequest

Revision History

2014/04/01 Changed foreground bucket desc.
2013/09/06 Clarified proper usage and limits.
2013/05/08 Automated cleanup pass.
2012/08/17 Initial version.


CONFIDENTIAL