Files
FC1/BinkSDK/htmlhelp/RADMEMALLOC.html
romkazvo 34d6c5d489 123
2023-08-07 19:29:24 +08:00

56 lines
2.3 KiB
HTML

<!-- This page was created with the RAD auto-doc generator. -->
<!doctype html public "-//w3c//dtd html 3.2 final//en">
<html>
<head>
<title>RADMEMALLOC</title>
<meta http-equiv="content-type" content="text/html; charset=iso8859-1">
<meta name="ms.locale" content="en-us">
<meta name="description" content="points to a function that will allocate memory on Bink's behalf.">
<meta name="ms-hkwd" content="RADMEMALLOC">
<link rel="stylesheet" title="default" href="reference.css" type="text/css" media="screen">
</head>
<body topmargin="0">
<table cellspacing=0 cellpadding=0 class=bar width=100% height=25>
<tr class=bar>
<td class=bar>
<i>&nbsp;<a href="index.html" class=trn>Bink SDK 1.5v</a></i>
</td>
</tr>
</table>
<h1>RADMEMALLOC</h1>
<p>The function <b>RADMEMALLOC</b> points to a function that will allocate memory on Bink's behalf.</p>
<table width=100% cellspacing=0 class=pre>
<tr class=pre>
<td class=pre>
<pre><b><a href="VOID_PTR.html" class=trn>VOID_PTR</a> RADLINK <a href="RADMEMALLOC.html" class=trn>RADMEMALLOC</a>(</b>
<b>&nbsp&nbsp<a href="U32.html" class=trn>U32</a>&nbsp</b><i>num_bytes</i>
<b>);</b></pre>
</td>
</tr>
</table>
<h4>In Parameters</h4>
<dl>
<dt><i>num_bytes</i></dt>
<dd>Specifies the number of bytes of memory to allocate.</dd>
</dl>
<h4>Returns</h4>
<p>Returns the new pointer or 0 or -1 if the allocation failed.</p>
<h4>Discussion</h4>
<p>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. <b>On the Nintendo GameCube, you must return 32-byte aligned memory pointers!</b> </p>
<p>
<br>
<b>Group:</b>
<a href="Bink API.html">Bink API</a><br>
<b>Related Functions:</b>
<a href="RADMEMFREE.html">RADMEMFREE</a>, <a href="RADSetMemory.html">RADSetMemory</a><br>
<b>Related Basic Types:</b>
<a href="U32.html">U32</a>, <a href="VOID_PTR.html">VOID_PTR</a></p>
<p align=center>
<a href="mailto:Bink1@radgametools.com">For technical support, e-mail Bink1@radgametools.com</a>
<br>
<a href="http://www.radgametools.com/bnkmain.htm?from=help1.5v">&#169; Copyright 1994-2003 RAD Game Tools, Inc. All Rights Reserved.</a>
</p>
<br>
</body>
</html>