#include <revolution/so.h>
typedef void* ( *SOAlloc )( u32 name, s32 size );
typedef void ( *SOFree ) ( u32 name, void* ptr, s32 size );
typedef struct SOLibraryConfig SOLibraryConfig;
struct SOLibraryConfig
{
SOAlloc alloc;
SOFree free;
};
The structure that defines the function to be called by the SO Library when actively allocating and deallocating work buffers. Specified when the SOInit function is called.
Note: See to it that a buffer aligned with a leading 32-byte border is allocated from MEM2 in the function specified in alloc. Furthermore, if the SO Library is operated from multiple threads, it is possible that alloc can be called multiple times at once. Perform exclusion control among threads among functions specifying alloc as needed for a multi-threaded application.
| alloc |
Specifies the function called by the SO Library when actively allocating a work buffer. Return the leading pointer to the allocated buffer as a return value. Return a null pointer when the buffer cannot be allocated.The arguments called from the SO Library are as follows:
|
||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| free |
Specifies the function called by the SO Library when deallocating a work buffer that was actively allocated. The arguments called from the SO Library are as follows:
|
2007/01/31 Initial version.
CONFIDENTIAL