<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>UbixOS V2: src/sys/include/lib/kmalloc.h File Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.7 --> <div class="tabs"> <ul> <li><a href="main.html"><span>Main Page</span></a></li> <li><a href="classes.html"><span>Data Structures</span></a></li> <li id="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> <li> <form action="search.php" method="get"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td><label> <u>S</u>earch for </label></td> <td><input type="text" name="query" value="" size="20" accesskey="s"/></td> </tr> </table> </form> </li> </ul></div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul></div> <div class="nav"> <a class="el" href="dir_897b6a2d7bab147dd1db58381aad3984.html">src</a> » <a class="el" href="dir_832905b1f7f5feaf61a306b40c0ac817.html">sys</a> » <a class="el" href="dir_caf4200c438ae9601464168e21e8e4d8.html">include</a> » <a class="el" href="dir_538938396c33f4585b2c9d510e98cbd2.html">lib</a></div> <h1>kmalloc.h File Reference</h1><code>#include <<a class="el" href="types_8h-source.html">ubixos/types.h</a>></code><br> <p> <a href="kmalloc_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Data Structures</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structmemDescriptor.html">memDescriptor</a></td></tr> <tr><td colspan="2"><br><h2>Defines</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="kmalloc_8h.html#f0fa0ac2c51032ef234e92b127e59a74">MALLOC_ALIGN</a>(size) (size + ((((size) % (MALLOC_ALIGN_SIZE)) == 0)? 0 : ((MALLOC_ALIGN_SIZE) - ((size) % (MALLOC_ALIGN_SIZE)))))</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="kmalloc_8h.html#507e7ea478c4d42970730698da5c1470">MALLOC_ALIGN_SIZE</a> 32</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="kmalloc_8h.html#81d09bc848b49133401b3efeeb65f1af">sysID</a> -2</td></tr> <tr><td colspan="2"><br><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="kmalloc_8h.html#aa9ed6886459604cf73ccdbf6410e487">kfree</a> (void *baseAddr)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="kmalloc_8h.html#150eab2ac4ce4553e21ca10e7f441762">kmalloc</a> (<a class="el" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> len)</td></tr> </table> <hr><h2>Define Documentation</h2> <a class="anchor" name="f0fa0ac2c51032ef234e92b127e59a74"></a><!-- doxytag: member="kmalloc.h::MALLOC_ALIGN" ref="f0fa0ac2c51032ef234e92b127e59a74" args="(size)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define MALLOC_ALIGN </td> <td>(</td> <td class="paramtype">size </td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> (size + ((((size) % (MALLOC_ALIGN_SIZE)) == 0)? 0 : ((MALLOC_ALIGN_SIZE) - ((size) % (MALLOC_ALIGN_SIZE)))))</td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="kmalloc_8h-source.html#l00041">41</a> of file <a class="el" href="kmalloc_8h-source.html">kmalloc.h</a>. <p> Referenced by <a class="el" href="kmalloc_8c-source.html#l00247">kmalloc()</a>. </div> </div><p> <a class="anchor" name="507e7ea478c4d42970730698da5c1470"></a><!-- doxytag: member="kmalloc.h::MALLOC_ALIGN_SIZE" ref="507e7ea478c4d42970730698da5c1470" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define MALLOC_ALIGN_SIZE 32 </td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="kmalloc_8h-source.html#l00040">40</a> of file <a class="el" href="kmalloc_8h-source.html">kmalloc.h</a>. </div> </div><p> <a class="anchor" name="81d09bc848b49133401b3efeeb65f1af"></a><!-- doxytag: member="kmalloc.h::sysID" ref="81d09bc848b49133401b3efeeb65f1af" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define sysID -2 </td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="kmalloc_8h-source.html#l00039">39</a> of file <a class="el" href="kmalloc_8h-source.html">kmalloc.h</a>. <p> Referenced by <a class="el" href="paging_8c-source.html#l00401">vmm_getFreeMallocPage()</a>, <a class="el" href="paging_8c-source.html#l00059">vmm_pagingInit()</a>, and <a class="el" href="vmm__memory_8c-source.html#l00186">vmmFindFreePage()</a>. </div> </div><p> <hr><h2>Function Documentation</h2> <a class="anchor" name="aa9ed6886459604cf73ccdbf6410e487"></a><!-- doxytag: member="kmalloc.h::kfree" ref="aa9ed6886459604cf73ccdbf6410e487" args="(void *baseAddr)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void kfree </td> <td>(</td> <td class="paramtype">void * </td> <td class="paramname"> <em>baseAddr</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="kmalloc_8c-source.html#l00351">351</a> of file <a class="el" href="kmalloc_8c-source.html">kmalloc.c</a>. <p> References <a class="el" href="assert_8h-source.html#l00064">assert</a>, <a class="el" href="kmalloc_8h-source.html#l00046">memDescriptor::baseAddr</a>, <a class="el" href="kmalloc_8c-source.html#l00124">insertFreeDesc()</a>, <a class="el" href="kprintf_8c-source.html#l00038">kprintf()</a>, <a class="el" href="kmalloc_8h-source.html#l00047">memDescriptor::limit</a>, <a class="el" href="kmalloc_8c-source.html#l00054">mallocSpinLock</a>, <a class="el" href="memset_8c-source.html#l00037">memset()</a>, <a class="el" href="kmalloc_8h-source.html#l00045">memDescriptor::next</a>, <a class="el" href="kmalloc_8h-source.html#l00044">memDescriptor::prev</a>, <a class="el" href="spinlock_8c-source.html#l00056">spinLock()</a>, <a class="el" href="spinlock_8c-source.html#l00037">spinUnlock()</a>, and <a class="el" href="kmalloc_8c-source.html#l00047">usedKernDesc</a>. <p> Referenced by <a class="el" href="kern__descrip_8c-source.html#l00090">close()</a>, <a class="el" href="device_8c-source.html#l00110">device_remove()</a>, <a class="el" href="exec_8c-source.html#l00142">execFile()</a>, <a class="el" href="file_8c-source.html#l00398">fclose()</a>, <a class="el" href="file_8c-source.html#l00274">fopen()</a>, <a class="el" href="kmod_8c-source.html#l00075">kmod_load()</a>, <a class="el" href="ld_8c-source.html#l00042">ldEnable()</a>, <a class="el" href="system_8c-source.html#l00234">mpi_destroyMbox()</a>, <a class="el" href="system_8c-source.html#l00189">mpi_fetchMessage()</a>, <a class="el" href="ne2k_8c-source.html#l00353">ne2kFreeBuffer()</a>, <a class="el" href="libcpp_8cc-source.html#l00064">operator delete()</a>, <a class="el" href="libcpp_8cc-source.html#l00051">operator delete[]()</a>, <a class="el" href="sys__arch_8c-source.html#l00215">sys_mbox_free()</a>, <a class="el" href="sys__arch_8c-source.html#l00385">sys_sem_free_()</a>, <a class="el" href="gen__calls_8c-source.html#l00067">sys_write()</a>, <a class="el" href="exec_8c-source.html#l00333">sysExec()</a>, <a class="el" href="systemtask_8c-source.html#l00048">systemTask()</a>, <a class="el" href="dirCache_8c-source.html#l00202">ubixfs_cacheDelete()</a>, <a class="el" href="directory_8c-source.html#l00094">ubixFSmkDir()</a>, <a class="el" href="ubthread_8c-source.html#l00064">ubthread_cond_destroy()</a>, <a class="el" href="ubthread_8c-source.html#l00070">ubthread_mutex_destroy()</a>, <a class="el" href="mount_8c-source.html#l00047">vfs_mount()</a>, and <a class="el" href="ubixfs_8c-source.html#l00232">writeUbixFS()</a>. </div> </div><p> <a class="anchor" name="150eab2ac4ce4553e21ca10e7f441762"></a><!-- doxytag: member="kmalloc.h::kmalloc" ref="150eab2ac4ce4553e21ca10e7f441762" args="(uInt32 len)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void* kmalloc </td> <td>(</td> <td class="paramtype"><a class="el" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> </td> <td class="paramname"> <em>len</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="kmalloc_8c-source.html#l00247">247</a> of file <a class="el" href="kmalloc_8c-source.html">kmalloc.c</a>. <p> References <a class="el" href="assert_8h-source.html#l00064">assert</a>, <a class="el" href="kmalloc_8h-source.html#l00046">memDescriptor::baseAddr</a>, <a class="el" href="kmalloc_8c-source.html#l00048">freeKernDesc</a>, <a class="el" href="kmalloc_8c-source.html#l00067">getEmptyDesc()</a>, <a class="el" href="kmalloc_8c-source.html#l00124">insertFreeDesc()</a>, <a class="el" href="kprintf_8c-source.html#l00038">kprintf()</a>, <a class="el" href="kmalloc_8h-source.html#l00047">memDescriptor::limit</a>, <a class="el" href="kmalloc_8h-source.html#l00041">MALLOC_ALIGN</a>, <a class="el" href="kmalloc_8c-source.html#l00054">mallocSpinLock</a>, <a class="el" href="kmalloc_8h-source.html#l00045">memDescriptor::next</a>, <a class="el" href="kmalloc_8h-source.html#l00044">memDescriptor::prev</a>, <a class="el" href="spinlock_8c-source.html#l00056">spinLock()</a>, <a class="el" href="spinlock_8c-source.html#l00037">spinUnlock()</a>, and <a class="el" href="kmalloc_8c-source.html#l00047">usedKernDesc</a>. <p> Referenced by <a class="el" href="directory_8c-source.html#l00066">addDirEntry()</a>, <a class="el" href="bioscall_8c-source.html#l00050">biosCall()</a>, <a class="el" href="devfs_8c-source.html#l00050">devfs_initialize()</a>, <a class="el" href="devfs_8c-source.html#l00178">devfs_makeNode()</a>, <a class="el" href="device_8c-source.html#l00051">device_add()</a>, <a class="el" href="exec_8c-source.html#l00142">execFile()</a>, <a class="el" href="kern__descrip_8c-source.html#l00067">falloc()</a>, <a class="el" href="fdc_8c-source.html#l00063">fdc_init()</a>, <a class="el" href="file_8c-source.html#l00274">fopen()</a>, <a class="el" href="hd_8c-source.html#l00039">initHardDisk()</a>, <a class="el" href="lnc_8c-source.html#l00104">initLNC()</a>, <a class="el" href="main_8c-source.html#l00097">kmain()</a>, <a class="el" href="kmod_8c-source.html#l00046">kmod_add()</a>, <a class="el" href="kmod_8c-source.html#l00075">kmod_load()</a>, <a class="el" href="ld_8c-source.html#l00042">ldEnable()</a>, <a class="el" href="lnc_8c-source.html#l00246">lncAttach()</a>, <a class="el" href="ethernetif_8c-source.html#l00081">low_level_init()</a>, <a class="el" href="system_8c-source.html#l00069">mpi_createMbox()</a>, <a class="el" href="system_8c-source.html#l00143">mpi_postMessage()</a>, <a class="el" href="system_8c-source.html#l00108">mpi_spam()</a>, <a class="el" href="ne2k_8c-source.html#l00070">ne2k_init()</a>, <a class="el" href="ne2k_8c-source.html#l00313">ne2kAllocBuffer()</a>, <a class="el" href="ubixfs_8c-source.html#l00046">openFileUbixFS()</a>, <a class="el" href="libcpp_8cc-source.html#l00058">operator new()</a>, <a class="el" href="libcpp_8cc-source.html#l00046">operator new[]()</a>, <a class="el" href="sched_8c-source.html#l00069">sched_init()</a>, <a class="el" href="sched_8c-source.html#l00143">schedNewTask()</a>, <a class="el" href="shell_8c-source.html#l00094">shell_thread()</a>, <a class="el" href="sys__arch_8c-source.html#l00204">sys_mbox_new()</a>, <a class="el" href="sys__arch_8c-source.html#l00299">sys_sem_new_()</a>, <a class="el" href="sys__arch_8c-source.html#l00172">sys_thread_new()</a>, <a class="el" href="gen__calls_8c-source.html#l00067">sys_write()</a>, <a class="el" href="kern__sysctl_8c-source.html#l00205">sysctl_add()</a>, <a class="el" href="kern__sysctl_8c-source.html#l00065">sysctl_init()</a>, <a class="el" href="exec_8c-source.html#l00333">sysExec()</a>, <a class="el" href="tty_8c-source.html#l00042">tty_init()</a>, <a class="el" href="dirCache_8c-source.html#l00185">ubixfs_cacheNew()</a>, <a class="el" href="ubixfs_8c-source.html#l00376">ubixfs_initialize()</a>, <a class="el" href="directory_8c-source.html#l00041">ubixFSLoadDir()</a>, <a class="el" href="directory_8c-source.html#l00094">ubixFSmkDir()</a>, <a class="el" href="ubixfs_8c-source.html#l00309">ubixFSUnlink()</a>, <a class="el" href="ubthread_8c-source.html#l00048">ubthread_cond_init()</a>, <a class="el" href="ubthread_8c-source.html#l00076">ubthread_create()</a>, <a class="el" href="ubthread_8c-source.html#l00056">ubthread_mutex_init()</a>, <a class="el" href="ufs_8c-source.html#l00272">ufs_openFile()</a>, <a class="el" href="mount_8c-source.html#l00047">vfs_mount()</a>, <a class="el" href="vfs_8c-source.html#l00081">vfsRegisterFS()</a>, <a class="el" href="vitals_8c-source.html#l00048">vitals_init()</a>, and <a class="el" href="ubixfs_8c-source.html#l00232">writeUbixFS()</a>. </div> </div><p> <hr size="1"><address style="align: right;"><small>Generated on Tue Dec 12 08:52:09 2006 for UbixOS V2 by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address> </body> </html>