<!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 V2: C:/Dev/git/UbixOS/sys/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="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></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 V2  <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"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ var searchBox = new SearchBox("searchBox", "search",false,'Search'); /* @license-end */ </script> <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('',true,false,'search.php','Search'); $(document).ready(function() { init_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('kmalloc_8h.html','');}); /* @license-end */ </script> <div id="doc-content"> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <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="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="kmalloc_8h__incl.png" border="0" usemap="#C_1_2Dev_2git_2UbixOS_2sys_2include_2lib_2kmalloc_8h" alt=""/></div> </div> </div> <p><a href="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="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="kmalloc_8h.html#af0fa0ac2c51032ef234e92b127e59a74">MALLOC_ALIGN</a>(size)   (size + ((((size) % (<a class="el" href="kmalloc_8h.html#a507e7ea478c4d42970730698da5c1470">MALLOC_ALIGN_SIZE</a>)) == 0)? 0 : ((<a class="el" href="kmalloc_8h.html#a507e7ea478c4d42970730698da5c1470">MALLOC_ALIGN_SIZE</a>) - ((size) % (<a class="el" href="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="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="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="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="kmalloc_8h.html#a150eab2ac4ce4553e21ca10e7f441762">kmalloc</a> (<a class="el" href="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="kmalloc_8h.html#a507e7ea478c4d42970730698da5c1470">MALLOC_ALIGN_SIZE</a>)) == 0)? 0 : ((<a class="el" href="kmalloc_8h.html#a507e7ea478c4d42970730698da5c1470">MALLOC_ALIGN_SIZE</a>) - ((size) % (<a class="el" href="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="kmalloc_8h_source.html#l00040">40</a> of file <a class="el" href="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="kmalloc_8h_source.html#l00039">39</a> of file <a class="el" href="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="kmalloc_8h_source.html#l00038">38</a> of file <a class="el" href="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="kmalloc_8c_source.html#l00342">342</a> of file <a class="el" href="kmalloc_8c_source.html">kmalloc.c</a>.</p> <p class="reference">References <a class="el" href="assert_8h_source.html#l00064">assert</a>, and <a class="el" href="kmalloc_8h_source.html#l00045">memDescriptor::baseAddr</a>.</p> <p class="reference">Referenced by <a class="el" href="descrip_8c_source.html#l00162">close()</a>, <a class="el" href="kernel_2elf_8c_source.html#l00037">elf_load_file()</a>, <a class="el" href="exec_8c_source.html#l00153">execFile()</a>, <a class="el" href="descrip_8c_source.html#l00096">falloc()</a>, <a class="el" href="descrip_8c_source.html#l00147">fdestroy()</a>, <a class="el" href="file_8c_source.html#l00388">fopen()</a>, <a class="el" href="kmod_8c_source.html#l00070">kmod_load()</a>, <a class="el" href="ld_8c_source.html#l00040">ldEnable()</a>, <a class="el" href="ne2k_8c_source.html#l00353">ne2kFreeBuffer()</a>, <a class="el" href="libcpp_8cc_source.html#l00073">operator delete()</a>, <a class="el" href="libcpp_8cc_source.html#l00062">operator delete[]()</a>, <a class="el" href="pci_8c_source.html#l00139">pciProbe()</a>, <a class="el" href="main_8cc_source.html#l00051">sdeThread()</a>, <a class="el" href="sem_8c_source.html#l00087">sem_destroy()</a>, <a class="el" href="vfs__calls_8c_source.html#l00151">sys_read()</a>, <a class="el" href="vfs__calls_8c_source.html#l00293">sys_write()</a>, <a class="el" href="exec_8c_source.html#l00340">sysExec()</a>, <a class="el" href="armv6_2systemtask_8c_source.html#l00047">systemTask()</a>, <a class="el" href="dirCache_8c_source.html#l00210">ubixfs_cacheDelete()</a>, <a class="el" href="directory_8c_source.html#l00092">ubixFSmkDir()</a>, <a class="el" href="ubthread_8c_source.html#l00071">ubthread_cond_destroy()</a>, <a class="el" href="ubthread_8c_source.html#l00077">ubthread_mutex_destroy()</a>, <a class="el" href="mount_8c_source.html#l00045">vfs_mount()</a>, <a class="el" href="ubixfs_8c_source.html#l00116">writeFileByte()</a>, and <a class="el" href="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="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="kmalloc_8c_source.html#l00241">241</a> of file <a class="el" href="kmalloc_8c_source.html">kmalloc.c</a>.</p> <p class="reference">References <a class="el" href="armv6_2spinlock_8c_source.html#l00055">spinLock()</a>.</p> <p class="reference">Referenced by <a class="el" href="directory_8c_source.html#l00064">addDirEntry()</a>, <a class="el" href="armv6_2bioscall_8c_source.html#l00049">biosCall()</a>, <a class="el" href="device_8c_source.html#l00049">device_add()</a>, <a class="el" href="descrip_8c_source.html#l00348">dup2()</a>, <a class="el" href="kernel_2elf_8c_source.html#l00037">elf_load_file()</a>, <a class="el" href="exec_8c_source.html#l00153">execFile()</a>, <a class="el" href="descrip_8c_source.html#l00096">falloc()</a>, <a class="el" href="descrip_8c_source.html#l00040">fcntl()</a>, <a class="el" href="fdc_8c_source.html#l00061">fdc_init()</a>, <a class="el" href="file_8c_source.html#l00388">fopen()</a>, <a class="el" href="lnc_8c_source.html#l00094">initLNC()</a>, <a class="el" href="kmod_8c_source.html#l00045">kmod_add()</a>, <a class="el" href="kmod_8c_source.html#l00070">kmod_load()</a>, <a class="el" href="ld_8c_source.html#l00040">ldEnable()</a>, <a class="el" href="lnc_8c_source.html#l00316">lnc_rxINT()</a>, <a class="el" href="lnc_8c_source.html#l00278">lnc_thread()</a>, <a class="el" href="lnc_8c_source.html#l00419">lncAttach()</a>, <a class="el" href="kern__trie_8c_source.html#l00033">new_trieNode()</a>, <a class="el" href="libcpp_8cc_source.html#l00068">operator new()</a>, <a class="el" href="libcpp_8cc_source.html#l00058">operator new[]()</a>, <a class="el" href="pci_8c_source.html#l00139">pciProbe()</a>, <a class="el" href="armv6_2sched_8c_source.html#l00135">schedNewTask()</a>, <a class="el" href="sem_8c_source.html#l00056">sem_init()</a>, <a class="el" href="shell_8c_source.html#l00095">shell_thread()</a>, <a class="el" href="i386_2fork_8c_source.html#l00040">sys_fork()</a>, <a class="el" href="kern__pipe_8c_source.html#l00036">sys_pipe2()</a>, <a class="el" href="sys__arch_8c_source.html#l00052">sys_sem_new()</a>, <a class="el" href="sys__arch_8c_source.html#l00379">sys_thread_new()</a>, <a class="el" href="vfs__calls_8c_source.html#l00293">sys_write()</a>, <a class="el" href="exec_8c_source.html#l00340">sysExec()</a>, <a class="el" href="sde_8cc_source.html#l00045">sysSDE()</a>, <a class="el" href="dirCache_8c_source.html#l00193">ubixfs_cacheNew()</a>, <a class="el" href="ubixfs_8c_source.html#l00371">ubixfs_initialize()</a>, <a class="el" href="directory_8c_source.html#l00039">ubixFSLoadDir()</a>, <a class="el" href="directory_8c_source.html#l00092">ubixFSmkDir()</a>, <a class="el" href="ubthread_8c_source.html#l00049">ubthread_cond_init()</a>, <a class="el" href="ubthread_8c_source.html#l00060">ubthread_mutex_init()</a>, <a class="el" href="mount_8c_source.html#l00045">vfs_mount()</a>, <a class="el" href="vitals_8c_source.html#l00047">vitals_init()</a>, <a class="el" href="ubixfs_8c_source.html#l00116">writeFileByte()</a>, and <a class="el" href="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="kmalloc_8h_a150eab2ac4ce4553e21ca10e7f441762_cgraph.png" border="0" usemap="#kmalloc_8h_a150eab2ac4ce4553e21ca10e7f441762_cgraph" alt=""/></div> </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_e6bb53534ac0e427887cf7a94c0c004e.html">C:</a></li><li class="navelem"><a class="el" href="dir_d99d5d4662bf24521eef49da6a8cd34d.html">Dev</a></li><li class="navelem"><a class="el" href="dir_474a4b306371cf7e7f6fa12cb0b77df6.html">git</a></li><li class="navelem"><a class="el" href="dir_849109bbd106d461b128d63e5babcedf.html">UbixOS</a></li><li class="navelem"><a class="el" href="dir_6ec99f6d7d5182ba8913209ab70c9f18.html">sys</a></li><li class="navelem"><a class="el" href="dir_d1be8160e739b6eed1f7843efdbae1b3.html">include</a></li><li class="navelem"><a class="el" href="dir_afcf3461ab02e1bc9b71d2f3c9f1f65d.html">lib</a></li><li class="navelem"><a class="el" href="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>