<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.16"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>UbixOS: include/lib/kmalloc.h File Reference</title> <link href="../../tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="../../jquery.js"></script> <script type="text/javascript" src="../../dynsections.js"></script> <link href="../../navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="../../resize.js"></script> <script type="text/javascript" src="../../navtreedata.js"></script> <script type="text/javascript" src="../../navtree.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(initResizable); /* @license-end */</script> <link href="../../doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">UbixOS  <span id="projectnumber">2.0</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.16 --> <script type="text/javascript" src="../../menudata.js"></script> <script type="text/javascript" src="../../menu.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('../../',false,false,'search.php','Search'); }); /* @license-end */</script> <div id="main-nav"></div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(function(){initNavTree('d4/d03/kmalloc_8h.html','../../');}); /* @license-end */ </script> <div id="doc-content"> <div class="header"> <div class="summary"> <a href="#nested-classes">Data Structures</a> | <a href="#define-members">Macros</a> | <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">kmalloc.h File Reference</div> </div> </div><!--header--> <div class="contents"> <div class="textblock"><code>#include <<a class="el" href="../../d0/d27/include_2sys_2types_8h_source.html">sys/types.h</a>></code><br /> </div><div class="textblock"><div class="dynheader"> Include dependency graph for kmalloc.h:</div> <div class="dyncontent"> <div class="center"><img src="../../dc/ddb/kmalloc_8h__incl.png" border="0" usemap="#include_2lib_2kmalloc_8h" alt=""/></div> <map name="include_2lib_2kmalloc_8h" id="include_2lib_2kmalloc_8h"> <area shape="rect" title=" " alt="" coords="5,5,145,32"/> <area shape="rect" href="../../d0/d27/include_2sys_2types_8h.html" title=" " alt="" coords="30,80,121,107"/> <area shape="rect" href="../../d0/d6f/__types_8h.html" title=" " alt="" coords="189,304,287,331"/> <area shape="rect" href="../../d9/dab/select_8h.html" title=" " alt="" coords="127,155,221,181"/> <area shape="rect" href="../../d6/d92/cdefs_8h.html" title=" " alt="" coords="65,229,155,256"/> <area shape="rect" href="../../d6/d30/__timespec_8h.html" title=" " alt="" coords="179,229,297,256"/> <area shape="rect" href="../../df/dc5/__timeval_8h.html" title=" " alt="" coords="321,229,427,256"/> <area shape="rect" href="../../d6/da4/__sigset_8h.html" title=" " alt="" coords="451,229,551,256"/> </map> </div> </div> <p><a href="../../d4/d03/kmalloc_8h_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> Data Structures</h2></td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d04/structmemDescriptor.html">memDescriptor</a></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> Macros</h2></td></tr> <tr class="memitem:af0fa0ac2c51032ef234e92b127e59a74"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d03/kmalloc_8h.html#af0fa0ac2c51032ef234e92b127e59a74">MALLOC_ALIGN</a>(size)   (size + ((((size) % (<a class="el" href="../../d4/d03/kmalloc_8h.html#a507e7ea478c4d42970730698da5c1470">MALLOC_ALIGN_SIZE</a>)) == 0)? 0 : ((<a class="el" href="../../d4/d03/kmalloc_8h.html#a507e7ea478c4d42970730698da5c1470">MALLOC_ALIGN_SIZE</a>) - ((size) % (<a class="el" href="../../d4/d03/kmalloc_8h.html#a507e7ea478c4d42970730698da5c1470">MALLOC_ALIGN_SIZE</a>)))))</td></tr> <tr class="separator:af0fa0ac2c51032ef234e92b127e59a74"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a507e7ea478c4d42970730698da5c1470"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d03/kmalloc_8h.html#a507e7ea478c4d42970730698da5c1470">MALLOC_ALIGN_SIZE</a>   32</td></tr> <tr class="separator:a507e7ea478c4d42970730698da5c1470"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a81d09bc848b49133401b3efeeb65f1af"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d03/kmalloc_8h.html#a81d09bc848b49133401b3efeeb65f1af">sysID</a>   -2</td></tr> <tr class="separator:a81d09bc848b49133401b3efeeb65f1af"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:aaa9ed6886459604cf73ccdbf6410e487"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d03/kmalloc_8h.html#aaa9ed6886459604cf73ccdbf6410e487">kfree</a> (void *baseAddr)</td></tr> <tr class="separator:aaa9ed6886459604cf73ccdbf6410e487"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a150eab2ac4ce4553e21ca10e7f441762"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d03/kmalloc_8h.html#a150eab2ac4ce4553e21ca10e7f441762">kmalloc</a> (<a class="el" href="../../dd/d1e/objgfx30_8h.html#ada085051a6d9a8e00a2cb256d1af14ba">uInt32</a> len)</td></tr> <tr class="separator:a150eab2ac4ce4553e21ca10e7f441762"><td class="memSeparator" colspan="2"> </td></tr> </table> <h2 class="groupheader">Macro Definition Documentation</h2> <a id="af0fa0ac2c51032ef234e92b127e59a74"></a> <h2 class="memtitle"><span class="permalink"><a href="#af0fa0ac2c51032ef234e92b127e59a74">◆ </a></span>MALLOC_ALIGN</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define MALLOC_ALIGN</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">size</td><td>)</td> <td>   (size + ((((size) % (<a class="el" href="../../d4/d03/kmalloc_8h.html#a507e7ea478c4d42970730698da5c1470">MALLOC_ALIGN_SIZE</a>)) == 0)? 0 : ((<a class="el" href="../../d4/d03/kmalloc_8h.html#a507e7ea478c4d42970730698da5c1470">MALLOC_ALIGN_SIZE</a>) - ((size) % (<a class="el" href="../../d4/d03/kmalloc_8h.html#a507e7ea478c4d42970730698da5c1470">MALLOC_ALIGN_SIZE</a>)))))</td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="../../d4/d03/kmalloc_8h_source.html#l00040">40</a> of file <a class="el" href="../../d4/d03/kmalloc_8h_source.html">kmalloc.h</a>.</p> </div> </div> <a id="a507e7ea478c4d42970730698da5c1470"></a> <h2 class="memtitle"><span class="permalink"><a href="#a507e7ea478c4d42970730698da5c1470">◆ </a></span>MALLOC_ALIGN_SIZE</h2> <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 class="definition">Definition at line <a class="el" href="../../d4/d03/kmalloc_8h_source.html#l00039">39</a> of file <a class="el" href="../../d4/d03/kmalloc_8h_source.html">kmalloc.h</a>.</p> </div> </div> <a id="a81d09bc848b49133401b3efeeb65f1af"></a> <h2 class="memtitle"><span class="permalink"><a href="#a81d09bc848b49133401b3efeeb65f1af">◆ </a></span>sysID</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define sysID   -2</td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="../../d4/d03/kmalloc_8h_source.html#l00038">38</a> of file <a class="el" href="../../d4/d03/kmalloc_8h_source.html">kmalloc.h</a>.</p> </div> </div> <h2 class="groupheader">Function Documentation</h2> <a id="aaa9ed6886459604cf73ccdbf6410e487"></a> <h2 class="memtitle"><span class="permalink"><a href="#aaa9ed6886459604cf73ccdbf6410e487">◆ </a></span>kfree()</h2> <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></td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="../../d3/d1a/kmalloc_8c_source.html#l00342">342</a> of file <a class="el" href="../../d3/d1a/kmalloc_8c_source.html">kmalloc.c</a>.</p> <p class="reference">References <a class="el" href="../../dc/da7/assert_8h_source.html#l00064">assert</a>, and <a class="el" href="../../d4/d03/kmalloc_8h_source.html#l00045">memDescriptor::baseAddr</a>.</p> <p class="reference">Referenced by <a class="el" href="../../d2/d3f/descrip_8c_source.html#l00161">close()</a>, <a class="el" href="../../d5/d8b/kernel_2elf_8c_source.html#l00037">elf_load_file()</a>, <a class="el" href="../../df/dc9/exec_8c_source.html#l00153">execFile()</a>, <a class="el" href="../../d2/d3f/descrip_8c_source.html#l00097">falloc()</a>, <a class="el" href="../../d2/d3f/descrip_8c_source.html#l00147">fdestroy()</a>, <a class="el" href="../../d6/d13/file_8c_source.html#l00395">fopen()</a>, <a class="el" href="../../d4/dda/kmod_8c_source.html#l00070">kmod_load()</a>, <a class="el" href="../../d8/dd5/ld_8c_source.html#l00040">ldEnable()</a>, <a class="el" href="../../dd/d07/ne2k_8c_source.html#l00353">ne2kFreeBuffer()</a>, <a class="el" href="../../d9/dd6/libcpp_8cc_source.html#l00073">operator delete()</a>, <a class="el" href="../../d9/dd6/libcpp_8cc_source.html#l00062">operator delete[]()</a>, <a class="el" href="../../d1/de8/pci_8c_source.html#l00139">pciProbe()</a>, <a class="el" href="../../d9/d0f/main_8cc_source.html#l00051">sdeThread()</a>, <a class="el" href="../../d2/d0b/sem_8c_source.html#l00087">sem_destroy()</a>, <a class="el" href="../../d7/d42/vfs__calls_8c_source.html#l00148">sys_read()</a>, <a class="el" href="../../d7/d42/vfs__calls_8c_source.html#l00291">sys_write()</a>, <a class="el" href="../../df/dc9/exec_8c_source.html#l00340">sysExec()</a>, <a class="el" href="../../dc/d2e/armv6_2systemtask_8c_source.html#l00047">systemTask()</a>, <a class="el" href="../../db/dff/dirCache_8c_source.html#l00210">ubixfs_cacheDelete()</a>, <a class="el" href="../../dc/d20/directory_8c_source.html#l00092">ubixFSmkDir()</a>, <a class="el" href="../../d5/d9a/ubthread_8c_source.html#l00071">ubthread_cond_destroy()</a>, <a class="el" href="../../d5/d9a/ubthread_8c_source.html#l00077">ubthread_mutex_destroy()</a>, <a class="el" href="../../dc/d92/mount_8c_source.html#l00045">vfs_mount()</a>, <a class="el" href="../../d2/d34/ubixfs_8c_source.html#l00116">writeFileByte()</a>, and <a class="el" href="../../d2/d34/ubixfs_8c_source.html#l00229">writeUbixFS()</a>.</p> </div> </div> <a id="a150eab2ac4ce4553e21ca10e7f441762"></a> <h2 class="memtitle"><span class="permalink"><a href="#a150eab2ac4ce4553e21ca10e7f441762">◆ </a></span>kmalloc()</h2> <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="../../dd/d1e/objgfx30_8h.html#ada085051a6d9a8e00a2cb256d1af14ba">uInt32</a> </td> <td class="paramname"><em>len</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="../../d3/d1a/kmalloc_8c_source.html#l00241">241</a> of file <a class="el" href="../../d3/d1a/kmalloc_8c_source.html">kmalloc.c</a>.</p> <p class="reference">References <a class="el" href="../../dc/d88/armv6_2spinlock_8c_source.html#l00055">spinLock()</a>.</p> <p class="reference">Referenced by <a class="el" href="../../dc/d20/directory_8c_source.html#l00064">addDirEntry()</a>, <a class="el" href="../../dd/d80/armv6_2bioscall_8c_source.html#l00049">biosCall()</a>, <a class="el" href="../../d5/d96/device_8c_source.html#l00049">device_add()</a>, <a class="el" href="../../d2/d3f/descrip_8c_source.html#l00347">dup2()</a>, <a class="el" href="../../d5/d8b/kernel_2elf_8c_source.html#l00037">elf_load_file()</a>, <a class="el" href="../../df/dc9/exec_8c_source.html#l00153">execFile()</a>, <a class="el" href="../../d2/d3f/descrip_8c_source.html#l00097">falloc()</a>, <a class="el" href="../../d2/d3f/descrip_8c_source.html#l00041">fcntl()</a>, <a class="el" href="../../d9/d43/fdc_8c_source.html#l00061">fdc_init()</a>, <a class="el" href="../../d6/d13/file_8c_source.html#l00395">fopen()</a>, <a class="el" href="../../d2/db6/lnc_8c_source.html#l00094">initLNC()</a>, <a class="el" href="../../d4/dda/kmod_8c_source.html#l00045">kmod_add()</a>, <a class="el" href="../../d4/dda/kmod_8c_source.html#l00070">kmod_load()</a>, <a class="el" href="../../d8/dd5/ld_8c_source.html#l00040">ldEnable()</a>, <a class="el" href="../../d2/db6/lnc_8c_source.html#l00316">lnc_rxINT()</a>, <a class="el" href="../../d2/db6/lnc_8c_source.html#l00278">lnc_thread()</a>, <a class="el" href="../../d2/db6/lnc_8c_source.html#l00419">lncAttach()</a>, <a class="el" href="../../dd/d77/kern__trie_8c_source.html#l00033">new_trieNode()</a>, <a class="el" href="../../d9/dd6/libcpp_8cc_source.html#l00068">operator new()</a>, <a class="el" href="../../d9/dd6/libcpp_8cc_source.html#l00058">operator new[]()</a>, <a class="el" href="../../d1/de8/pci_8c_source.html#l00139">pciProbe()</a>, <a class="el" href="../../d3/d02/armv6_2sched_8c_source.html#l00135">schedNewTask()</a>, <a class="el" href="../../d2/d0b/sem_8c_source.html#l00056">sem_init()</a>, <a class="el" href="../../d6/d4f/shell_8c_source.html#l00095">shell_thread()</a>, <a class="el" href="../../d9/d48/i386_2fork_8c_source.html#l00040">sys_fork()</a>, <a class="el" href="../../d6/dba/kern__pipe_8c_source.html#l00036">sys_pipe2()</a>, <a class="el" href="../../d9/d56/sys__arch_8c_source.html#l00052">sys_sem_new()</a>, <a class="el" href="../../d9/d56/sys__arch_8c_source.html#l00378">sys_thread_new()</a>, <a class="el" href="../../d7/d42/vfs__calls_8c_source.html#l00291">sys_write()</a>, <a class="el" href="../../df/dc9/exec_8c_source.html#l00340">sysExec()</a>, <a class="el" href="../../d2/d00/sde_8cc_source.html#l00045">sysSDE()</a>, <a class="el" href="../../db/dff/dirCache_8c_source.html#l00193">ubixfs_cacheNew()</a>, <a class="el" href="../../d2/d34/ubixfs_8c_source.html#l00371">ubixfs_initialize()</a>, <a class="el" href="../../dc/d20/directory_8c_source.html#l00039">ubixFSLoadDir()</a>, <a class="el" href="../../dc/d20/directory_8c_source.html#l00092">ubixFSmkDir()</a>, <a class="el" href="../../d5/d9a/ubthread_8c_source.html#l00049">ubthread_cond_init()</a>, <a class="el" href="../../d5/d9a/ubthread_8c_source.html#l00060">ubthread_mutex_init()</a>, <a class="el" href="../../dc/d92/mount_8c_source.html#l00045">vfs_mount()</a>, <a class="el" href="../../d2/d4e/vitals_8c_source.html#l00047">vitals_init()</a>, <a class="el" href="../../d2/d34/ubixfs_8c_source.html#l00116">writeFileByte()</a>, and <a class="el" href="../../d2/d34/ubixfs_8c_source.html#l00229">writeUbixFS()</a>.</p> <div class="dynheader"> Here is the call graph for this function:</div> <div class="dyncontent"> <div class="center"><img src="../../d4/d03/kmalloc_8h_a150eab2ac4ce4553e21ca10e7f441762_cgraph.png" border="0" usemap="#d4/d03/kmalloc_8h_a150eab2ac4ce4553e21ca10e7f441762_cgraph" alt=""/></div> <map name="d4/d03/kmalloc_8h_a150eab2ac4ce4553e21ca10e7f441762_cgraph" id="d4/d03/kmalloc_8h_a150eab2ac4ce4553e21ca10e7f441762_cgraph"> <area shape="rect" title=" " alt="" coords="5,31,72,57"/> <area shape="rect" href="../../dc/d88/armv6_2spinlock_8c.html#a71f03d2ba55111c715b6068254847a53" title=" " alt="" coords="120,31,195,57"/> <area shape="rect" href="../../d3/d02/armv6_2sched_8c.html#a08933fe6d593a1c78b9080359f15a0b7" title=" " alt="" coords="243,5,334,32"/> <area shape="rect" href="../../dc/d88/armv6_2spinlock_8c.html#a740766af5da58616f700fffab6768a78" title=" " alt="" coords="243,56,335,83"/> </map> </div> </div> </div> </div><!-- contents --> </div><!-- doc-content --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="navelem"><a class="el" href="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_a61f22007e0f347cded0d82030ee545d.html">lib</a></li><li class="navelem"><a class="el" href="../../d4/d03/kmalloc_8h.html">kmalloc.h</a></li> <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.16 </li> </ul> </div> </body> </html>