CAMCheckMemSegmentation

Syntax

#include <cafe/camera/camera.h>

int CAMCheckMemSegmentation(void *pMem, unsigned int size);

Parameters

pMem Start address of the allocated memory region.
size Size of the allocated memory region.

Return Values

A value of zero indicates success and any other values indicate the type of error that was encountered. The following error codes can be returned:

CAMERA_ERROR_INVALID_ARG Either pMem is NULL and/or size is zero.
CAMERA_ERROR_SEGMENT_VIOLATION Physical memory straddles 256 MB boundary.
CAMERA_ERROR_NONE No error.

Description

Determines whether the memory allocated by the caller meets hardware limitation of not crossing a 256 MB segment. This limitation applies only to the work memory and target decode surface memory. If this API returns CAMERA_ERROR_SEGMENT_VIOLATION, caller should reallocate the memory, free the memory allocated earlier, and call this API again to validate the new memory.

Do Not Call From

Background Do not call this function from the background.

Revision History

2013/05/08 Automated cleanup pass.
2012/07/13 Initial version.


CONFIDENTIAL