1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 8<TITLE>OSInitAlloc</TITLE> 9</HEAD> 10<BODY> 11<H1>OSInitAlloc</H1> 12 13<H2>Syntax</H2> 14<dl><dd><pre class="construction"> 15#include <revolution/os.h> 16 17void* OSInitAlloc(void* arenaStart, void* arenaEnd, int maxHeaps); 18</pre></dd></dl> 19 20<H2>Arguments</H2> 21<TABLE class="arguments" border="1" > 22 <TBODY> 23 <TR> 24<TH><STRONG><EM><CODE>arenaStart</CODE></EM></STRONG></TH> 25<TD>Arena start address.</TD> 26 </TR> 27 <TR> 28<TH><STRONG><EM><CODE>arenaEnd</CODE></EM></STRONG></TH> 29<TD>Arena end address.</TD> 30 </TR> 31 <TR> 32<TH><STRONG><EM><CODE>maxHeaps</CODE></EM></STRONG></TH> 33<TD>Maximum number of active heaps that will be used in the program lifetime.</TD> 34 </TR> 35 </TBODY> 36</TABLE> 37 38<H2>Return Values</H2> 39<P>Real arena start address aligned to a 32-byte boundary after the heap array has been allocated.</P> 40 41<H2>Description</H2> 42<P>Although this function is provided for the sake of compatibility, we recommend using the MEM library.</P> 43<P>Initializes memory allocation services and the arena in which all heaps will reside. This routine must be called before creating a heap.</P> 44<P>Several small pieces of memory used to store an array of heap descriptors are reserved at the beginning of the arena. Returns the base address of the new arena.</P> 45 46<H2>See Also</H2> 47<P class="reference"> 48<A href="../toc.html#Memory Allocation" target="contents">Memory Allocation Functions</A>, 49<A href="OSCreateHeap.html">OSCreateHeap</A>, 50<A href="OSDestroyHeap.html">OSDestroyHeap</A> 51</P> 52 53<H2>Revision History</H2> 54<P> 552006/03/01 Initial version.<br> 56</P> 57 58<hr><p>CONFIDENTIAL</p></body> 59</HTML>