Bink SDK 1.5v

# RADMEMALLOC

The function RADMEMALLOC points to a function that will allocate memory on Bink's behalf.

    VOID_PTR RADLINK RADMEMALLOC(
      U32 num_bytes
    );

#### In Parameters

num_bytes
  Specifies the number of bytes of memory to allocate.

#### Returns

Returns the new pointer or 0 or -1 if the allocation failed.

#### Discussion

This function replaces the function that Bink calls to allocate memory. It should return a pointer to at least num_bytes of memory. If the allocation fails, you can return 0 and Bink will attempt to allocate memory from the operating system, or you can return -1 and Bink will simply fail the allocation. On the Nintendo GameCube, you must return 32-byte aligned memory pointers!

Group: Bink API
Related Functions: RADMEMFREE, RADSetMemory
Related Basic Types: U32, VOID_PTR

For technical support, e-mail Bink1@radgametools.com
© Copyright 1994-2003 RAD Game Tools, Inc. All Rights Reserved.