<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.16">
  <compounddef id="kmalloc_8c" kind="file" language="C++">
    <compoundname>kmalloc.c</compoundname>
    <includes refid="kmalloc_8h" local="no">lib/kmalloc.h</includes>
    <includes refid="kprintf_8h" local="no">lib/kprintf.h</includes>
    <includes refid="kpanic_8h" local="no">ubixos/kpanic.h</includes>
    <includes refid="sched_8h" local="no">ubixos/sched.h</includes>
    <includes refid="spinlock_8h" local="no">ubixos/spinlock.h</includes>
    <includes refid="vmm_8h" local="no">vmm/vmm.h</includes>
    <includes refid="string_8h" local="no">string.h</includes>
    <includes refid="assert_8h" local="no">assert.h</includes>
    <includes refid="include_2sys_2types_8h" local="no">sys/types.h</includes>
    <incdepgraph>
      <node id="25">
        <label>ufs/ufs.h</label>
        <link refid="ufs_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="26" relation="include">
        </childnode>
      </node>
      <node id="11">
        <label>stdarg.h</label>
        <link refid="stdarg_8h"/>
      </node>
      <node id="12">
        <label>ubixos/kpanic.h</label>
        <link refid="kpanic_8h"/>
      </node>
      <node id="29">
        <label>sys/tss.h</label>
        <link refid="tss_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="1">
        <label>C:/Dev/git/UbixOS/sys/lib/kmalloc.c</label>
        <link refid="kmalloc_8c"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
        <childnode refid="13" relation="include">
        </childnode>
        <childnode refid="30" relation="include">
        </childnode>
        <childnode refid="31" relation="include">
        </childnode>
        <childnode refid="34" relation="include">
        </childnode>
        <childnode refid="36" relation="include">
        </childnode>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="28">
        <label>ubixos/tty.h</label>
        <link refid="tty_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="35">
        <label>strings.h</label>
        <link refid="strings_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="18">
        <label>i386/cpu.h</label>
        <link refid="i386_2cpu_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="32">
        <label>vmm/paging.h</label>
        <link refid="paging_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="33" relation="include">
        </childnode>
        <childnode refid="16" relation="include">
        </childnode>
      </node>
      <node id="5">
        <label>sys/select.h</label>
        <link refid="select_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="8" relation="include">
        </childnode>
        <childnode refid="9" relation="include">
        </childnode>
      </node>
      <node id="21">
        <label>vfs/inode.h</label>
        <link refid="inode_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="22" relation="include">
        </childnode>
        <childnode refid="23" relation="include">
        </childnode>
        <childnode refid="24" relation="include">
        </childnode>
        <childnode refid="25" relation="include">
        </childnode>
      </node>
      <node id="30">
        <label>ubixos/spinlock.h</label>
        <link refid="spinlock_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="9">
        <label>sys/_sigset.h</label>
        <link refid="__sigset_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="31">
        <label>vmm/vmm.h</label>
        <link refid="vmm_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="32" relation="include">
        </childnode>
      </node>
      <node id="2">
        <label>lib/kmalloc.h</label>
        <link refid="kmalloc_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="27">
        <label>vfs/mount.h</label>
        <link refid="mount_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="20">
        <label>sys/resource.h</label>
        <link refid="resource_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="17">
        <label>sys/trap.h</label>
        <link refid="trap_8h"/>
        <childnode refid="18" relation="include">
        </childnode>
      </node>
      <node id="34">
        <label>string.h</label>
        <link refid="string_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="35" relation="include">
        </childnode>
      </node>
      <node id="3">
        <label>sys/types.h</label>
        <link refid="include_2sys_2types_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="5" relation="include">
        </childnode>
      </node>
      <node id="14">
        <label>vfs/file.h</label>
        <link refid="include_2vfs_2file_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="15" relation="include">
        </childnode>
        <childnode refid="16" relation="include">
        </childnode>
        <childnode refid="21" relation="include">
        </childnode>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="25" relation="include">
        </childnode>
      </node>
      <node id="24">
        <label>fs/msdos_fs.h</label>
        <link refid="msdos__fs_8h"/>
      </node>
      <node id="36">
        <label>assert.h</label>
        <link refid="assert_8h"/>
      </node>
      <node id="19">
        <label>sys/signal.h</label>
        <link refid="sys_2signal_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="23">
        <label>fs/pipe_fs.h</label>
        <link refid="pipe__fs_8h"/>
      </node>
      <node id="22">
        <label>ubixos/wait.h</label>
        <link refid="wait_8h"/>
      </node>
      <node id="10">
        <label>lib/kprintf.h</label>
        <link refid="kprintf_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
      </node>
      <node id="16">
        <label>sys/thread.h</label>
        <link refid="thread_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="17" relation="include">
        </childnode>
        <childnode refid="19" relation="include">
        </childnode>
        <childnode refid="20" relation="include">
        </childnode>
      </node>
      <node id="6">
        <label>sys/cdefs.h</label>
        <link refid="cdefs_8h"/>
      </node>
      <node id="13">
        <label>ubixos/sched.h</label>
        <link refid="sched_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="14" relation="include">
        </childnode>
        <childnode refid="28" relation="include">
        </childnode>
        <childnode refid="29" relation="include">
        </childnode>
        <childnode refid="16" relation="include">
        </childnode>
      </node>
      <node id="4">
        <label>sys/_types.h</label>
        <link refid="__types_8h"/>
      </node>
      <node id="7">
        <label>sys/_timespec.h</label>
        <link refid="__timespec_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="26">
        <label>sys/device.h</label>
        <link refid="include_2sys_2device_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="33">
        <label>sys/sysproto_posix.h</label>
        <link refid="sysproto__posix_8h"/>
        <childnode refid="19" relation="include">
        </childnode>
        <childnode refid="16" relation="include">
        </childnode>
        <childnode refid="14" relation="include">
        </childnode>
      </node>
      <node id="15">
        <label>ubixfs/dirCache.h</label>
        <link refid="dirCache_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="8">
        <label>sys/_timeval.h</label>
        <link refid="__timeval_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="var">
      <memberdef kind="variable" id="kmalloc_8c_1a5ad53160ecc0b04e2c788d35d92416de" prot="public" static="yes" mutable="no">
        <type>struct <ref refid="structspinLock" kindref="compound">spinLock</ref></type>
        <definition>struct spinLock emptyDescSpinLock</definition>
        <argsstring></argsstring>
        <name>emptyDescSpinLock</name>
        <initializer>= <ref refid="spinlock_8h_1a0fe85a4f3642683148b25916d6c5eafd" kindref="member">SPIN_LOCK_INITIALIZER</ref></initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/lib/kmalloc.c" line="49" column="27" bodyfile="C:/Dev/git/UbixOS/sys/lib/kmalloc.c" bodystart="55" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="kmalloc_8c_1a33325db110e0782930deda9b52e7224b" prot="public" static="yes" mutable="no">
        <type>struct <ref refid="structmemDescriptor" kindref="compound">memDescriptor</ref> *</type>
        <definition>struct memDescriptor* emptyKernDesc</definition>
        <argsstring></argsstring>
        <name>emptyKernDesc</name>
        <initializer>= 0x0</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/lib/kmalloc.c" line="49" column="27" bodyfile="C:/Dev/git/UbixOS/sys/lib/kmalloc.c" bodystart="49" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="kmalloc_8c_1aa0c5be194ccb3f36a4ea8e666fbd2dac" prot="public" static="yes" mutable="no">
        <type>struct <ref refid="structmemDescriptor" kindref="compound">memDescriptor</ref> *</type>
        <definition>struct memDescriptor* freeKernDesc</definition>
        <argsstring></argsstring>
        <name>freeKernDesc</name>
        <initializer>= 0x0</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/lib/kmalloc.c" line="48" column="27" bodyfile="C:/Dev/git/UbixOS/sys/lib/kmalloc.c" bodystart="48" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="kmalloc_8c_1a16a015c04fe0e2fd0d371bae4b84d41d" prot="public" static="yes" mutable="no">
        <type>struct <ref refid="structspinLock" kindref="compound">spinLock</ref></type>
        <definition>struct spinLock mallocSpinLock</definition>
        <argsstring></argsstring>
        <name>mallocSpinLock</name>
        <initializer>= <ref refid="spinlock_8h_1a0fe85a4f3642683148b25916d6c5eafd" kindref="member">SPIN_LOCK_INITIALIZER</ref></initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/lib/kmalloc.c" line="49" column="27" bodyfile="C:/Dev/git/UbixOS/sys/lib/kmalloc.c" bodystart="54" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="kmalloc_8c_1af60f75b69fa71f90b84c0dd58f0040a5" prot="public" static="yes" mutable="no">
        <type>struct <ref refid="structmemDescriptor" kindref="compound">memDescriptor</ref> *</type>
        <definition>struct memDescriptor* usedKernDesc</definition>
        <argsstring></argsstring>
        <name>usedKernDesc</name>
        <initializer>= 0x0</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/lib/kmalloc.c" line="47" column="27" bodyfile="C:/Dev/git/UbixOS/sys/lib/kmalloc.c" bodystart="47" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="kmalloc_8c_1af6c4ea5cb961c72548d92ff65d7e33a4" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void *</type>
        <definition>static void* getEmptyDesc</definition>
        <argsstring>()</argsstring>
        <name>getEmptyDesc</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/lib/kmalloc.c" line="66" column="13" bodyfile="C:/Dev/git/UbixOS/sys/lib/kmalloc.c" bodystart="66" bodyend="108"/>
      </memberdef>
      <memberdef kind="function" id="kmalloc_8c_1aeb1c3f1ef8eb9063c2e5c4af488dd2d0" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>static int insertFreeDesc</definition>
        <argsstring>(struct memDescriptor *freeDesc)</argsstring>
        <name>insertFreeDesc</name>
        <param>
          <type>struct <ref refid="structmemDescriptor" kindref="compound">memDescriptor</ref> *</type>
          <declname>freeDesc</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/lib/kmalloc.c" line="121" column="12" bodyfile="C:/Dev/git/UbixOS/sys/lib/kmalloc.c" bodystart="121" bodyend="169"/>
      </memberdef>
      <memberdef kind="function" id="kmalloc_8c_1aaa9ed6886459604cf73ccdbf6410e487" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void kfree</definition>
        <argsstring>(void *baseAddr)</argsstring>
        <name>kfree</name>
        <param>
          <type>void *</type>
          <declname>baseAddr</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/lib/kmalloc.c" line="342" column="6" bodyfile="C:/Dev/git/UbixOS/sys/lib/kmalloc.c" bodystart="342" bodyend="382"/>
        <references refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" compoundref="assert_8h" startline="64">assert</references>
        <references refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" compoundref="kmalloc_8h" startline="45">memDescriptor::baseAddr</references>
        <referencedby refid="descrip_8c_1aec14600d2aa9db1288f00704ba3a55d7" compoundref="descrip_8c" startline="162" endline="171">close</referencedby>
        <referencedby refid="kernel_2elf_8c_1aaf5f82fbbff76c71fcefe513c40730b4" compoundref="kernel_2elf_8c" startline="37" endline="137">elf_load_file</referencedby>
        <referencedby refid="exec_8c_1af80d4412d42ed1b5bf9a1b9774230f33" compoundref="exec_8c" startline="153" endline="330">execFile</referencedby>
        <referencedby refid="descrip_8c_1a9c93ac280b559128027746bda7c5d6d4" compoundref="descrip_8c" startline="96" endline="123">falloc</referencedby>
        <referencedby refid="descrip_8c_1ae7b881d8f4c6e81d8e10468783ce080f" compoundref="descrip_8c" startline="147" endline="160">fdestroy</referencedby>
        <referencedby refid="include_2vfs_2file_8h_1aa5a3a3f92ecea1381616825ba8646306" compoundref="file_8c" startline="388" endline="518">fopen</referencedby>
        <referencedby refid="kmod_8c_1a92b68dbf95bf5d651555a4c02ee1a74b" compoundref="kmod_8c" startline="70" endline="207">kmod_load</referencedby>
        <referencedby refid="ld_8c_1add6ca1fb619f0bc0f4addffbfc5577a7" compoundref="ld_8c" startline="40" endline="194">ldEnable</referencedby>
        <referencedby refid="ne2k_8c_1adeb7b37e43d9b5203408374d8d8ce586" compoundref="ne2k_8c" startline="353" endline="357">ne2kFreeBuffer</referencedby>
        <referencedby refid="libcpp_8cc_1a3d97a7e2a0208075b4b37328c96ed390" compoundref="libcpp_8cc" startline="73" endline="76">operator delete</referencedby>
        <referencedby refid="libcpp_8cc_1a1d8b2d6f17242ae0d182b0f7a98ba54f" compoundref="libcpp_8cc" startline="62" endline="66">operator delete[]</referencedby>
        <referencedby refid="pci_8c_1a9a16d3ca1d4538415b752ab0c58e72ba" compoundref="pci_8c" startline="139" endline="242">pciProbe</referencedby>
        <referencedby refid="main_8cc_1aa6c38d07b193857fbaebc1656b89136e" compoundref="main_8cc" startline="51" endline="143">sdeThread</referencedby>
        <referencedby refid="sem_8c_1aa386df202c6e9b90a1445a61ce694210" compoundref="sem_8c" startline="87" endline="100">sem_destroy</referencedby>
        <referencedby refid="vfs__calls_8c_1a7678726e58a6393050f3b26e0b9b3152" compoundref="vfs__calls_8c" startline="151" endline="237">sys_read</referencedby>
        <referencedby refid="vfs__calls_8c_1a159495d16f0ec154193733ad4fb1fc71" compoundref="vfs__calls_8c" startline="293" endline="364">sys_write</referencedby>
        <referencedby refid="exec_8c_1a219681612352232186a0f568457d851d" compoundref="exec_8c" startline="340" endline="545">sysExec</referencedby>
        <referencedby refid="systemtask_8h_1ac7cc6a806237f8657fcdce169319fd7f" compoundref="armv6_2systemtask_8c" startline="47" endline="117">systemTask</referencedby>
        <referencedby refid="dirCache_8h_1aa31fa0816ce9018ef327f17a48b36d3c" compoundref="dirCache_8c" startline="210" endline="238">ubixfs_cacheDelete</referencedby>
        <referencedby refid="include_2ubixfs_2ubixfs_8h_1a55ee126c39c4bb7e875cc82f317e5aee" compoundref="directory_8c" startline="92" endline="125">ubixFSmkDir</referencedby>
        <referencedby refid="ubthread_8c_1ae914fae69538736dc5e494c15ce93a17" compoundref="ubthread_8c" startline="71" endline="75">ubthread_cond_destroy</referencedby>
        <referencedby refid="ubthread_8c_1a278f5d5b1e11b6668b75da6a285442e4" compoundref="ubthread_8c" startline="77" endline="81">ubthread_mutex_destroy</referencedby>
        <referencedby refid="mount_8h_1a1255ebfdcd5f7048ffe187e836f8eb28" compoundref="mount_8c" startline="45" endline="92">vfs_mount</referencedby>
        <referencedby refid="include_2ubixfs_2ubixfs_8h_1a65f42c9b6ca7c526642fa1c168272b03" compoundref="ubixfs_8c" startline="116" endline="187">writeFileByte</referencedby>
        <referencedby refid="include_2ubixfs_2ubixfs_8h_1ab4c558016c9b29b63d6f8c8ba5fe7384" compoundref="ubixfs_8c" startline="229" endline="304">writeUbixFS</referencedby>
      </memberdef>
      <memberdef kind="function" id="kmalloc_8c_1a150eab2ac4ce4553e21ca10e7f441762" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void *</type>
        <definition>void* kmalloc</definition>
        <argsstring>(uInt32 len)</argsstring>
        <name>kmalloc</name>
        <param>
          <type><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref></type>
          <declname>len</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/lib/kmalloc.c" line="241" column="6" bodyfile="C:/Dev/git/UbixOS/sys/lib/kmalloc.c" bodystart="241" bodyend="331"/>
        <references refid="armv6_2spinlock_8c_1a71f03d2ba55111c715b6068254847a53" compoundref="armv6_2spinlock_8c" startline="55" endline="61">spinLock</references>
        <referencedby refid="include_2ubixfs_2ubixfs_8h_1a58993494728ce5af573cd51322735210" compoundref="directory_8c" startline="64" endline="89">addDirEntry</referencedby>
        <referencedby refid="bioscall_8h_1a56a172d2268fc10811a0bb180d7c3f49" compoundref="armv6_2bioscall_8c" startline="49" endline="96">biosCall</referencedby>
        <referencedby refid="device_8c_1a24bac04b529afec40daa960bd7e7b8ee" compoundref="device_8c" startline="49" endline="70">device_add</referencedby>
        <referencedby refid="descrip_8c_1a266f2b3582c66190ca585589f2938065" compoundref="descrip_8c" startline="348" endline="375">dup2</referencedby>
        <referencedby refid="kernel_2elf_8c_1aaf5f82fbbff76c71fcefe513c40730b4" compoundref="kernel_2elf_8c" startline="37" endline="137">elf_load_file</referencedby>
        <referencedby refid="exec_8c_1af80d4412d42ed1b5bf9a1b9774230f33" compoundref="exec_8c" startline="153" endline="330">execFile</referencedby>
        <referencedby refid="descrip_8c_1a9c93ac280b559128027746bda7c5d6d4" compoundref="descrip_8c" startline="96" endline="123">falloc</referencedby>
        <referencedby refid="descrip_8c_1aa825d15d1f3691b7e31917e05ef9f3bc" compoundref="descrip_8c" startline="40" endline="90">fcntl</referencedby>
        <referencedby refid="fdc_8c_1a2fad92b12d9ff56bf300b7e53875c75d" compoundref="fdc_8c" startline="61" endline="75">fdc_init</referencedby>
        <referencedby refid="include_2vfs_2file_8h_1aa5a3a3f92ecea1381616825ba8646306" compoundref="file_8c" startline="388" endline="518">fopen</referencedby>
        <referencedby refid="lnc_8c_1a0c06be8c0c0c046c5073f4cfae3eed7c" compoundref="lnc_8c" startline="94" endline="189">initLNC</referencedby>
        <referencedby refid="kmod_8c_1af2a085a786b2cf77d53da7f364948cd4" compoundref="kmod_8c" startline="45" endline="68">kmod_add</referencedby>
        <referencedby refid="kmod_8c_1a92b68dbf95bf5d651555a4c02ee1a74b" compoundref="kmod_8c" startline="70" endline="207">kmod_load</referencedby>
        <referencedby refid="ld_8c_1add6ca1fb619f0bc0f4addffbfc5577a7" compoundref="ld_8c" startline="40" endline="194">ldEnable</referencedby>
        <referencedby refid="lnc_8c_1afa544fa662f94035a72f9c04f7f7fd5a" compoundref="lnc_8c" startline="316" endline="350">lnc_rxINT</referencedby>
        <referencedby refid="lnc_8c_1a6fb9d9c3d73ce2d10b2cebe1d71f07e2" compoundref="lnc_8c" startline="278" endline="314">lnc_thread</referencedby>
        <referencedby refid="lnc_8c_1a86e977fd8113976b87da564f2b53a2d7" compoundref="lnc_8c" startline="419" endline="512">lncAttach</referencedby>
        <referencedby refid="kern__trie_8c_1afadb3489e5ff24f80e606d9651ec59fc" compoundref="kern__trie_8c" startline="33" endline="43">new_trieNode</referencedby>
        <referencedby refid="libcpp_8cc_1a9bccb23e08907b6033c45f524578239a" compoundref="libcpp_8cc" startline="68" endline="71">operator new</referencedby>
        <referencedby refid="libcpp_8cc_1ae55853bd31de5afc92b2093f2567c007" compoundref="libcpp_8cc" startline="58" endline="60">operator new[]</referencedby>
        <referencedby refid="pci_8c_1a9a16d3ca1d4538415b752ab0c58e72ba" compoundref="pci_8c" startline="139" endline="242">pciProbe</referencedby>
        <referencedby refid="sched_8h_1a92458df2063761371869cdfe0c9b4ee3" compoundref="armv6_2sched_8c" startline="135" endline="165">schedNewTask</referencedby>
        <referencedby refid="sem_8c_1a19bd6e9be9540104f4ab465624e9a579" compoundref="sem_8c" startline="56" endline="73">sem_init</referencedby>
        <referencedby refid="shell_8c_1a0bc95784e81888a4e64b84306bdc2c66" compoundref="shell_8c" startline="95" endline="110">shell_thread</referencedby>
        <referencedby refid="sysproto__posix_8h_1a2df56a6757909dd205e60732f34acabb" compoundref="i386_2fork_8c" startline="40" endline="131">sys_fork</referencedby>
        <referencedby refid="kern__pipe_8c_1ab6accb21879bf318f953d5e4124db685" compoundref="kern__pipe_8c" startline="36" endline="69">sys_pipe2</referencedby>
        <referencedby refid="group__sys__sem_1gadb68acad14b34550b9891bc11bbf4e63" compoundref="sys__arch_8c" startline="52" endline="72">sys_sem_new</referencedby>
        <referencedby refid="group__sys__misc_1ga0d596afdd8dbcfad320172d39b0f607a" compoundref="sys__arch_8c" startline="379" endline="408">sys_thread_new</referencedby>
        <referencedby refid="vfs__calls_8c_1a159495d16f0ec154193733ad4fb1fc71" compoundref="vfs__calls_8c" startline="293" endline="364">sys_write</referencedby>
        <referencedby refid="exec_8c_1a219681612352232186a0f568457d851d" compoundref="exec_8c" startline="340" endline="545">sysExec</referencedby>
        <referencedby refid="sde_8cc_1a769e7f0a3b5204fd1298d710f36cdfa6" compoundref="sde_8cc" startline="45" endline="145">sysSDE</referencedby>
        <referencedby refid="dirCache_8h_1aadfffea5ad577cecdfbc4eb7989cf193" compoundref="dirCache_8c" startline="193" endline="207">ubixfs_cacheNew</referencedby>
        <referencedby refid="ubixfs_8c_1a32762e2563015d124909f3317c2a7423" compoundref="ubixfs_8c" startline="371" endline="437">ubixfs_initialize</referencedby>
        <referencedby refid="include_2ubixfs_2ubixfs_8h_1a3f7a88e7f709a200096c93c0deb13ec2" compoundref="directory_8c" startline="39" endline="61">ubixFSLoadDir</referencedby>
        <referencedby refid="include_2ubixfs_2ubixfs_8h_1a55ee126c39c4bb7e875cc82f317e5aee" compoundref="directory_8c" startline="92" endline="125">ubixFSmkDir</referencedby>
        <referencedby refid="ubthread_8c_1a57168ab258d780168b7334a387651133" compoundref="ubthread_8c" startline="49" endline="58">ubthread_cond_init</referencedby>
        <referencedby refid="ubthread_8c_1a32f60f4953d8865991ea48cf26236b97" compoundref="ubthread_8c" startline="60" endline="69">ubthread_mutex_init</referencedby>
        <referencedby refid="mount_8h_1a1255ebfdcd5f7048ffe187e836f8eb28" compoundref="mount_8c" startline="45" endline="92">vfs_mount</referencedby>
        <referencedby refid="vitals_8c_1a34d7f48e003fe73f05d594c6c1f00d49" compoundref="vitals_8c" startline="47" endline="70">vitals_init</referencedby>
        <referencedby refid="include_2ubixfs_2ubixfs_8h_1a65f42c9b6ca7c526642fa1c168272b03" compoundref="ubixfs_8c" startline="116" endline="187">writeFileByte</referencedby>
        <referencedby refid="include_2ubixfs_2ubixfs_8h_1ab4c558016c9b29b63d6f8c8ba5fe7384" compoundref="ubixfs_8c" startline="229" endline="304">writeUbixFS</referencedby>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">/*-</highlight></codeline>
<codeline lineno="2"><highlight class="comment"><sp/>*<sp/>Copyright<sp/>(c)<sp/>2002-2018<sp/>The<sp/>UbixOS<sp/>Project.</highlight></codeline>
<codeline lineno="3"><highlight class="comment"><sp/>*<sp/>All<sp/>rights<sp/>reserved.</highlight></codeline>
<codeline lineno="4"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="5"><highlight class="comment"><sp/>*<sp/>This<sp/>was<sp/>developed<sp/>by<sp/>Christopher<sp/>W.<sp/>Olsen<sp/>for<sp/>the<sp/>UbixOS<sp/>Project.</highlight></codeline>
<codeline lineno="6"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="7"><highlight class="comment"><sp/>*<sp/>Redistribution<sp/>and<sp/>use<sp/>in<sp/>source<sp/>and<sp/>binary<sp/>forms,<sp/>with<sp/>or<sp/>without<sp/>modification,<sp/>are<sp/>permitted</highlight></codeline>
<codeline lineno="8"><highlight class="comment"><sp/>*<sp/>provided<sp/>that<sp/>the<sp/>following<sp/>conditions<sp/>are<sp/>met:</highlight></codeline>
<codeline lineno="9"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="10"><highlight class="comment"><sp/>*<sp/>1)<sp/>Redistributions<sp/>of<sp/>source<sp/>code<sp/>must<sp/>retain<sp/>the<sp/>above<sp/>copyright<sp/>notice,<sp/>this<sp/>list<sp/>of</highlight></codeline>
<codeline lineno="11"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>conditions,<sp/>the<sp/>following<sp/>disclaimer<sp/>and<sp/>the<sp/>list<sp/>of<sp/>authors.</highlight></codeline>
<codeline lineno="12"><highlight class="comment"><sp/>*<sp/>2)<sp/>Redistributions<sp/>in<sp/>binary<sp/>form<sp/>must<sp/>reproduce<sp/>the<sp/>above<sp/>copyright<sp/>notice,<sp/>this<sp/>list<sp/>of</highlight></codeline>
<codeline lineno="13"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>conditions,<sp/>the<sp/>following<sp/>disclaimer<sp/>and<sp/>the<sp/>list<sp/>of<sp/>authors<sp/>in<sp/>the<sp/>documentation<sp/>and/or</highlight></codeline>
<codeline lineno="14"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>other<sp/>materials<sp/>provided<sp/>with<sp/>the<sp/>distribution.</highlight></codeline>
<codeline lineno="15"><highlight class="comment"><sp/>*<sp/>3)<sp/>Neither<sp/>the<sp/>name<sp/>of<sp/>the<sp/>UbixOS<sp/>Project<sp/>nor<sp/>the<sp/>names<sp/>of<sp/>its<sp/>contributors<sp/>may<sp/>be<sp/>used<sp/>to</highlight></codeline>
<codeline lineno="16"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>endorse<sp/>or<sp/>promote<sp/>products<sp/>derived<sp/>from<sp/>this<sp/>software<sp/>without<sp/>specific<sp/>prior<sp/>written</highlight></codeline>
<codeline lineno="17"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>permission.</highlight></codeline>
<codeline lineno="18"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="19"><highlight class="comment"><sp/>*<sp/>THIS<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>BY<sp/>THE<sp/>AUTHOR<sp/>AND<sp/>CONTRIBUTORS<sp/>&quot;AS<sp/>IS&quot;<sp/>AND<sp/>ANY<sp/>EXPRESS<sp/>OR<sp/>IMPLIED</highlight></codeline>
<codeline lineno="20"><highlight class="comment"><sp/>*<sp/>WARRANTIES,<sp/>INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>THE<sp/>IMPLIED<sp/>WARRANTIES<sp/>OF<sp/>MERCHANTABILITY<sp/>AND<sp/>FITNESS</highlight></codeline>
<codeline lineno="21"><highlight class="comment"><sp/>*<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>ARE<sp/>DISCLAIMED.<sp/>IN<sp/>NO<sp/>EVENT<sp/>SHALL<sp/>THE<sp/>COPYRIGHT<sp/>OWNER<sp/>OR<sp/>CONTRIBUTORS</highlight></codeline>
<codeline lineno="22"><highlight class="comment"><sp/>*<sp/>BE<sp/>LIABLE<sp/>FOR<sp/>ANY<sp/>DIRECT,<sp/>INDIRECT,<sp/>INCIDENTAL,<sp/>SPECIAL,<sp/>EXEMPLARY,<sp/>OR<sp/>CONSEQUENTIAL<sp/>DAMAGES</highlight></codeline>
<codeline lineno="23"><highlight class="comment"><sp/>*<sp/>(INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>PROCUREMENT<sp/>OF<sp/>SUBSTITUTE<sp/>GOODS<sp/>OR<sp/>SERVICES;<sp/>LOSS<sp/>OF<sp/>USE,<sp/>DATA,</highlight></codeline>
<codeline lineno="24"><highlight class="comment"><sp/>*<sp/>OR<sp/>PROFITS;<sp/>OR<sp/>BUSINESS<sp/>INTERRUPTION)<sp/>HOWEVER<sp/>CAUSED<sp/>AND<sp/>ON<sp/>ANY<sp/>THEORY<sp/>OF<sp/>LIABILITY,<sp/>WHETHER<sp/>IN</highlight></codeline>
<codeline lineno="25"><highlight class="comment"><sp/>*<sp/>CONTRACT,<sp/>STRICT<sp/>LIABILITY,<sp/>OR<sp/>TORT<sp/>(INCLUDING<sp/>NEGLIGENCE<sp/>OR<sp/>OTHERWISE)<sp/>ARISING<sp/>IN<sp/>ANY<sp/>WAY<sp/>OUT</highlight></codeline>
<codeline lineno="26"><highlight class="comment"><sp/>*<sp/>OF<sp/>THE<sp/>USE<sp/>OF<sp/>THIS<sp/>SOFTWARE,<sp/>EVEN<sp/>IF<sp/>ADVISED<sp/>OF<sp/>THE<sp/>POSSIBILITY<sp/>OF<sp/>SUCH<sp/>DAMAGE.</highlight></codeline>
<codeline lineno="27"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="28"><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="kmalloc_8h" kindref="compound">lib/kmalloc.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="kprintf_8h" kindref="compound">lib/kprintf.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="kpanic_8h" kindref="compound">ubixos/kpanic.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="sched_8h" kindref="compound">ubixos/sched.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="spinlock_8h" kindref="compound">ubixos/spinlock.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="vmm_8h" kindref="compound">vmm/vmm.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="string_8h" kindref="compound">string.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="36"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="assert_8h" kindref="compound">assert.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="37"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="include_2sys_2types_8h" kindref="compound">sys/types.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"></highlight></codeline>
<codeline lineno="39"><highlight class="normal"></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="40"><highlight class="comment"><sp/>Set<sp/>up<sp/>three<sp/>descriptor<sp/>tables:</highlight></codeline>
<codeline lineno="41"><highlight class="comment"></highlight></codeline>
<codeline lineno="42"><highlight class="comment"><sp/>kernDesc<sp/><sp/><sp/><sp/><sp/><sp/>-<sp/>The<sp/>inuse<sp/>descriptor<sp/>table</highlight></codeline>
<codeline lineno="43"><highlight class="comment"><sp/>freeKernDesc<sp/><sp/>-<sp/>The<sp/>free<sp/>descriptor<sp/>table<sp/>(descriptors<sp/>with<sp/>memory<sp/>backing<sp/>just<sp/>not<sp/>in<sp/>use)</highlight></codeline>
<codeline lineno="44"><highlight class="comment"><sp/>emptyKernDesc<sp/>-<sp/>The<sp/>empty<sp/>descriptor<sp/>table<sp/>(descriptors<sp/>with<sp/>out<sp/>a<sp/>memory<sp/>backing)</highlight></codeline>
<codeline lineno="45"><highlight class="comment"></highlight></codeline>
<codeline lineno="46"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="47"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structmemDescriptor" kindref="compound">memDescriptor</ref><sp/>*usedKernDesc<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="48"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structmemDescriptor" kindref="compound">memDescriptor</ref><sp/>*freeKernDesc<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="49"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structmemDescriptor" kindref="compound">memDescriptor</ref><sp/>*emptyKernDesc<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="50"><highlight class="normal"></highlight></codeline>
<codeline lineno="51"><highlight class="normal"></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="52"><highlight class="comment"><sp/>Set<sp/>up<sp/>our<sp/>spinlocks<sp/>so<sp/>we<sp/>do<sp/>not<sp/>corrupt<sp/>linked<sp/>lists<sp/>if<sp/>we<sp/>have<sp/>re-entrancy</highlight></codeline>
<codeline lineno="53"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="54"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structspinLock" kindref="compound">spinLock</ref><sp/>mallocSpinLock<sp/>=<sp/><ref refid="spinlock_8h_1a0fe85a4f3642683148b25916d6c5eafd" kindref="member">SPIN_LOCK_INITIALIZER</ref>;</highlight></codeline>
<codeline lineno="55"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structspinLock" kindref="compound">spinLock</ref><sp/>emptyDescSpinLock<sp/>=<sp/><ref refid="spinlock_8h_1a0fe85a4f3642683148b25916d6c5eafd" kindref="member">SPIN_LOCK_INITIALIZER</ref>;</highlight></codeline>
<codeline lineno="56"><highlight class="normal"></highlight></codeline>
<codeline lineno="57"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="58"><highlight class="comment"></highlight></codeline>
<codeline lineno="59"><highlight class="comment"><sp/>Function:<sp/>void<sp/>*getEmptyDesc()</highlight></codeline>
<codeline lineno="60"><highlight class="comment"><sp/>Description:<sp/>Find<sp/>An<sp/>Empty<sp/>Descriptor</highlight></codeline>
<codeline lineno="61"><highlight class="comment"></highlight></codeline>
<codeline lineno="62"><highlight class="comment"><sp/>Notes:</highlight></codeline>
<codeline lineno="63"><highlight class="comment"></highlight></codeline>
<codeline lineno="64"><highlight class="comment"><sp/>02/17/03<sp/>-<sp/>Is<sp/>This<sp/>Efficient?</highlight></codeline>
<codeline lineno="65"><highlight class="comment"></highlight></codeline>
<codeline lineno="66"><highlight class="comment"><sp/>************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="67"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*getEmptyDesc()<sp/>{</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structmemDescriptor" kindref="compound">memDescriptor</ref><sp/>*tmpDesc<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="70"><highlight class="normal"></highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><ref refid="armv6_2spinlock_8c_1a71f03d2ba55111c715b6068254847a53" kindref="member">spinLock</ref>(&amp;emptyDescSpinLock);</highlight></codeline>
<codeline lineno="72"><highlight class="normal"></highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/>tmpDesc<sp/>=<sp/>emptyKernDesc;</highlight></codeline>
<codeline lineno="74"><highlight class="normal"></highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpDesc<sp/>!=<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/><sp/><sp/>emptyKernDesc<sp/>=<sp/>tmpDesc-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref>;</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(emptyKernDesc<sp/>!=<sp/>0x0)</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>emptyKernDesc-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="79"><highlight class="normal"></highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpDesc-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpDesc-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="armv6_2spinlock_8c_1ae29ab191c93f9ead066cb462dd2e7247" kindref="member">spinUnlock</ref>(&amp;emptyDescSpinLock);</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(tmpDesc);</highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((emptyKernDesc<sp/>=<sp/>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structmemDescriptor" kindref="compound">memDescriptor</ref><sp/>*)<sp/><ref refid="paging_8h_1a6d09af2e4df8a7165caa4c4b1895e87c" kindref="member">vmm_getFreeMallocPage</ref>(4))<sp/>==<sp/>0x0)</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="armv6_2kpanic_8c_1adb9a182aa071791a306163d50d653deb" kindref="member">kpanic</ref>(</highlight><highlight class="stringliteral">&quot;Error:<sp/>vmmGetFreeKernelPage<sp/>returned<sp/>NULL\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="87"><highlight class="normal"></highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>zero<sp/>out<sp/>the<sp/>memory<sp/>so<sp/>we<sp/>know<sp/>there<sp/>is<sp/>no<sp/>garbage<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/><ref refid="string_8h_1ace4b911463887af5e748326323e99a23" kindref="member">memset</ref>(emptyKernDesc,<sp/>0x0,<sp/>0x4000);</highlight></codeline>
<codeline lineno="90"><highlight class="normal"></highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/>emptyKernDesc[0].<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>=<sp/>&amp;emptyKernDesc[1];</highlight></codeline>
<codeline lineno="92"><highlight class="normal"></highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0x1;<sp/>i<sp/>&lt;<sp/>((0x4000<sp/>/<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structmemDescriptor" kindref="compound">memDescriptor</ref>)));<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(i<sp/>+<sp/>1<sp/>&lt;<sp/>(0x4000<sp/>/<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structmemDescriptor" kindref="compound">memDescriptor</ref>)))</highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>emptyKernDesc[i].<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>=<sp/>&amp;emptyKernDesc[i<sp/>+<sp/>1];</highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>emptyKernDesc[i].<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/>emptyKernDesc[i].<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>&amp;emptyKernDesc[i<sp/>-<sp/>1];</highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="100"><highlight class="normal"></highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/>tmpDesc<sp/>=<sp/>&amp;emptyKernDesc[0];</highlight></codeline>
<codeline lineno="102"><highlight class="normal"></highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/>emptyKernDesc<sp/>=<sp/>tmpDesc-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref>;</highlight></codeline>
<codeline lineno="104"><highlight class="normal"><sp/><sp/>emptyKernDesc-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/>tmpDesc-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/>tmpDesc-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="107"><highlight class="normal"><sp/><sp/><ref refid="armv6_2spinlock_8c_1ae29ab191c93f9ead066cb462dd2e7247" kindref="member">spinUnlock</ref>(&amp;emptyDescSpinLock);</highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(tmpDesc);</highlight></codeline>
<codeline lineno="109"><highlight class="normal">}</highlight></codeline>
<codeline lineno="110"><highlight class="normal"></highlight></codeline>
<codeline lineno="111"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="112"><highlight class="comment"></highlight></codeline>
<codeline lineno="113"><highlight class="comment"><sp/>Function:<sp/>void<sp/>insertFreeDesc(struct<sp/>memDescriptor<sp/>*freeDesc)</highlight></codeline>
<codeline lineno="114"><highlight class="comment"><sp/>Description:<sp/>This<sp/>Function<sp/>Inserts<sp/>A<sp/>Free<sp/>Descriptor<sp/>On<sp/>The<sp/>List<sp/>Which<sp/>Is</highlight></codeline>
<codeline lineno="115"><highlight class="comment"><sp/>Kept<sp/>In<sp/>Size<sp/>Order</highlight></codeline>
<codeline lineno="116"><highlight class="comment"></highlight></codeline>
<codeline lineno="117"><highlight class="comment"><sp/>Notes:</highlight></codeline>
<codeline lineno="118"><highlight class="comment"></highlight></codeline>
<codeline lineno="119"><highlight class="comment"><sp/>02/17/03<sp/>-<sp/>This<sp/>Was<sp/>Inspired<sp/>By<sp/>TCA&apos;s<sp/>Great<sp/>Wisdom<sp/>-</highlight></codeline>
<codeline lineno="120"><highlight class="comment"><sp/>&quot;[20:20:59]<sp/>&lt;TCA&gt;<sp/>You<sp/>should<sp/>just<sp/>insert<sp/>it<sp/>in<sp/>order&quot;</highlight></codeline>
<codeline lineno="121"><highlight class="comment"></highlight></codeline>
<codeline lineno="122"><highlight class="comment"><sp/>************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="123"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>insertFreeDesc(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structmemDescriptor" kindref="compound">memDescriptor</ref><sp/>*freeDesc)<sp/>{</highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structmemDescriptor" kindref="compound">memDescriptor</ref><sp/>*tmpDesc<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="125"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(freeDesc);</highlight></codeline>
<codeline lineno="126"><highlight class="normal"></highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(freeDesc-&gt;<ref refid="structmemDescriptor_1a058bea66f641af082849f748d83ea065" kindref="member">limit</ref><sp/>&lt;=<sp/>0x0)</highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="armv6_2kpanic_8c_1adb9a182aa071791a306163d50d653deb" kindref="member">kpanic</ref>(</highlight><highlight class="stringliteral">&quot;Inserting<sp/>Descriptor<sp/>with<sp/>no<sp/>limit\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="129"><highlight class="normal"></highlight></codeline>
<codeline lineno="130"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(freeKernDesc<sp/>!=<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="131"><highlight class="normal"></highlight></codeline>
<codeline lineno="132"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>0</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="133"><highlight class="normal"><sp/><sp/><sp/><sp/>freeDesc-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>=<sp/>freeKernDesc;</highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/><sp/><sp/>freeDesc-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="135"><highlight class="normal"><sp/><sp/><sp/><sp/>freeKernDesc-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>freeDesc;</highlight></codeline>
<codeline lineno="136"><highlight class="normal"><sp/><sp/><sp/><sp/>freeKernDesc<sp/>=<sp/>freeDesc;</highlight></codeline>
<codeline lineno="137"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="138"><highlight class="normal"></highlight></codeline>
<codeline lineno="139"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(tmpDesc<sp/>=<sp/>freeKernDesc;<sp/>tmpDesc<sp/>!=<sp/>0x0;<sp/>tmpDesc<sp/>=<sp/>tmpDesc-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref>)<sp/>{</highlight></codeline>
<codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(freeDesc-&gt;<ref refid="structmemDescriptor_1a058bea66f641af082849f748d83ea065" kindref="member">limit</ref><sp/>&lt;=<sp/>tmpDesc-&gt;<ref refid="structmemDescriptor_1a058bea66f641af082849f748d83ea065" kindref="member">limit</ref>)<sp/>{</highlight></codeline>
<codeline lineno="141"><highlight class="normal"></highlight></codeline>
<codeline lineno="142"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>freeDesc-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>tmpDesc-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref>;</highlight></codeline>
<codeline lineno="143"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpDesc-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>!=<sp/>0x0)</highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref>-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>=<sp/>freeDesc;</highlight></codeline>
<codeline lineno="145"><highlight class="normal"></highlight></codeline>
<codeline lineno="146"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>freeDesc;</highlight></codeline>
<codeline lineno="147"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>freeDesc-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>=<sp/>tmpDesc;</highlight></codeline>
<codeline lineno="148"><highlight class="normal"></highlight></codeline>
<codeline lineno="149"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpDesc<sp/>==<sp/>freeKernDesc)</highlight></codeline>
<codeline lineno="150"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>freeKernDesc<sp/>=<sp/>freeDesc;</highlight></codeline>
<codeline lineno="151"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="153"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpDesc-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="154"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>=<sp/>freeDesc;</highlight></codeline>
<codeline lineno="155"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>freeDesc-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>tmpDesc;</highlight></codeline>
<codeline lineno="156"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>freeDesc-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="157"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="159"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="armv6_2kpanic_8c_1adb9a182aa071791a306163d50d653deb" kindref="member">kpanic</ref>(</highlight><highlight class="stringliteral">&quot;didnt<sp/>Insert\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="161"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="163"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="164"><highlight class="normal"><sp/><sp/><sp/><sp/>freeDesc-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/><sp/><sp/>freeDesc-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/>freeKernDesc<sp/>=<sp/>freeDesc;</highlight></codeline>
<codeline lineno="167"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="168"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="169"><highlight class="normal"></highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x1);</highlight></codeline>
<codeline lineno="171"><highlight class="normal">}</highlight></codeline>
<codeline lineno="172"><highlight class="normal"></highlight></codeline>
<codeline lineno="173"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="174"><highlight class="comment"></highlight></codeline>
<codeline lineno="175"><highlight class="comment"><sp/>Function:<sp/>void<sp/>mergeMemBlocks()</highlight></codeline>
<codeline lineno="176"><highlight class="comment"><sp/>Description:<sp/>This<sp/>Function<sp/>Will<sp/>Merge<sp/>Free<sp/>Blocks<sp/>And<sp/>Free<sp/>Pages</highlight></codeline>
<codeline lineno="177"><highlight class="comment"></highlight></codeline>
<codeline lineno="178"><highlight class="comment"><sp/>Notes:</highlight></codeline>
<codeline lineno="179"><highlight class="comment"></highlight></codeline>
<codeline lineno="180"><highlight class="comment"><sp/>03/05/03<sp/>-<sp/>We<sp/>Have<sp/>A<sp/>Problem<sp/>It<sp/>Seems<sp/>The<sp/>First<sp/>Block<sp/>Is<sp/>Limit<sp/>0x0</highlight></codeline>
<codeline lineno="181"><highlight class="comment"></highlight></codeline>
<codeline lineno="182"><highlight class="comment"><sp/>************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="183"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>_IGNORE</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="184"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>mergeMemBlocks()<sp/>{</highlight></codeline>
<codeline lineno="185"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structmemDescriptor" kindref="compound">memDescriptor</ref><sp/>*tmpDesc1<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="186"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structmemDescriptor" kindref="compound">memDescriptor</ref><sp/>*tmpDesc2<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="187"><highlight class="normal"><sp/><sp/><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref><sp/><ref refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" kindref="member">baseAddr</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="188"><highlight class="normal"></highlight></codeline>
<codeline lineno="189"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="190"><highlight class="normal"></highlight></codeline>
<codeline lineno="191"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//Loop<sp/>The<sp/>Free<sp/>Descriptors<sp/>See<sp/>If<sp/>We<sp/>Can<sp/>Merge<sp/>Them</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="192"><highlight class="normal"><sp/><sp/>mergeStart:<sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(tmpDesc1<sp/>=<sp/>freeKernDesc;<sp/>tmpDesc1<sp/>!=<sp/>0x0;<sp/>tmpDesc1<sp/>=<sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref>)<sp/>{</highlight></codeline>
<codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="194"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>Compare<sp/>The<sp/>Base<sp/>Addr<sp/>With<sp/>The<sp/>Other<sp/>Descriptors<sp/>If<sp/>You<sp/>Find<sp/>The<sp/>One</highlight></codeline>
<codeline lineno="195"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>That<sp/>You<sp/>Are<sp/>Looking<sp/>For<sp/>Lets<sp/>Merge<sp/>Them</highlight></codeline>
<codeline lineno="196"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="197"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpDesc1-&gt;<ref refid="structmemDescriptor_1a058bea66f641af082849f748d83ea065" kindref="member">limit</ref><sp/>!=<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="198"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" kindref="member">baseAddr</ref><sp/>=<sp/>(<ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref>)<sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" kindref="member">baseAddr</ref><sp/>+<sp/>(<ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref>)<sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1a058bea66f641af082849f748d83ea065" kindref="member">limit</ref>;</highlight></codeline>
<codeline lineno="199"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(tmpDesc2<sp/>=<sp/>freeKernDesc;<sp/>tmpDesc2;<sp/>tmpDesc2<sp/>=<sp/>tmpDesc2-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref>)<sp/>{</highlight></codeline>
<codeline lineno="200"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((<ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref>)<sp/>tmpDesc2-&gt;<ref refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" kindref="member">baseAddr</ref><sp/>==<sp/><ref refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" kindref="member">baseAddr</ref>)<sp/>{</highlight></codeline>
<codeline lineno="201"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1a058bea66f641af082849f748d83ea065" kindref="member">limit</ref><sp/>+=<sp/>tmpDesc2-&gt;<ref refid="structmemDescriptor_1a058bea66f641af082849f748d83ea065" kindref="member">limit</ref>;</highlight></codeline>
<codeline lineno="202"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc2-&gt;<ref refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" kindref="member">baseAddr</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="203"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc2-&gt;<ref refid="structmemDescriptor_1a058bea66f641af082849f748d83ea065" kindref="member">limit</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="204"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpDesc2-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref>)<sp/>{</highlight></codeline>
<codeline lineno="205"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc2-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref>-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>=<sp/>tmpDesc2-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref>;</highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="207"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpDesc2-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref>)<sp/>{</highlight></codeline>
<codeline lineno="208"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc2-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref>-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>tmpDesc2-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref>;</highlight></codeline>
<codeline lineno="209"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="210"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc2-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="211"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc2-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>=<sp/>emptyKernDesc;</highlight></codeline>
<codeline lineno="212"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>emptyKernDesc-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>tmpDesc2;</highlight></codeline>
<codeline lineno="213"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>emptyKernDesc<sp/>=<sp/>tmpDesc2;</highlight></codeline>
<codeline lineno="214"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpDesc1-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref>)<sp/>{</highlight></codeline>
<codeline lineno="215"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref>-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>=<sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref>;</highlight></codeline>
<codeline lineno="216"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="217"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpDesc1-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref>)<sp/>{</highlight></codeline>
<codeline lineno="218"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref>-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref>;</highlight></codeline>
<codeline lineno="219"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="220"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="221"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="222"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;mergememBlocks:<sp/>[%i]\n&quot;</highlight><highlight class="normal">,<sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1a058bea66f641af082849f748d83ea065" kindref="member">limit</ref>);</highlight></codeline>
<codeline lineno="223"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>insertFreeDesc(tmpDesc1);</highlight></codeline>
<codeline lineno="224"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//tmpDesc1<sp/>=<sp/>freeKernDesc;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="225"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>mergeStart;</highlight></codeline>
<codeline lineno="226"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="227"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="228"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="229"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="230"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="231"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="232"><highlight class="normal">}</highlight></codeline>
<codeline lineno="233"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="234"><highlight class="normal"></highlight></codeline>
<codeline lineno="235"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="236"><highlight class="comment"></highlight></codeline>
<codeline lineno="237"><highlight class="comment"><sp/>Function:<sp/>void<sp/>*kmalloc(uInt32<sp/>len)</highlight></codeline>
<codeline lineno="238"><highlight class="comment"><sp/>Description:<sp/>Allocate<sp/>Kernel<sp/>Memory</highlight></codeline>
<codeline lineno="239"><highlight class="comment"></highlight></codeline>
<codeline lineno="240"><highlight class="comment"><sp/>Notes:</highlight></codeline>
<codeline lineno="241" refid="kmalloc_8c_1a150eab2ac4ce4553e21ca10e7f441762" refkind="member"><highlight class="comment"></highlight></codeline>
<codeline lineno="242"><highlight class="comment"><sp/>02/17/03<sp/>-<sp/>Do<sp/>I<sp/>Still<sp/>Need<sp/>To<sp/>Pass<sp/>In<sp/>The<sp/>Pid?</highlight></codeline>
<codeline lineno="243"><highlight class="comment"></highlight></codeline>
<codeline lineno="244"><highlight class="comment"><sp/>************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="245"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*<ref refid="kmalloc_8c_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(<ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref><sp/>len)<sp/>{</highlight></codeline>
<codeline lineno="246"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structmemDescriptor" kindref="compound">memDescriptor</ref><sp/>*tmpDesc1<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="247"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structmemDescriptor" kindref="compound">memDescriptor</ref><sp/>*tmpDesc2<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="248"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*<ref refid="structbuf" kindref="compound">buf</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="249"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="250"><highlight class="normal"><sp/><sp/><ref refid="objgfx30_8h_1a81f3b46fa4ddd984830104840a08da82" kindref="member">uInt16</ref><sp/>pages<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="251"><highlight class="normal"></highlight></codeline>
<codeline lineno="252"><highlight class="normal"><sp/><sp/><ref refid="armv6_2spinlock_8c_1a71f03d2ba55111c715b6068254847a53" kindref="member">spinLock</ref>(&amp;mallocSpinLock);</highlight></codeline>
<codeline lineno="253"><highlight class="normal"></highlight></codeline>
<codeline lineno="254"><highlight class="normal"><sp/><sp/>len<sp/>=<sp/><ref refid="kmalloc_8h_1af0fa0ac2c51032ef234e92b127e59a74" kindref="member">MALLOC_ALIGN</ref>(len);</highlight></codeline>
<codeline lineno="255"><highlight class="normal"></highlight></codeline>
<codeline lineno="256"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(len<sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="257"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="armv6_2spinlock_8c_1ae29ab191c93f9ead066cb462dd2e7247" kindref="member">spinUnlock</ref>(&amp;mallocSpinLock);</highlight></codeline>
<codeline lineno="258"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;kmalloc:<sp/>len<sp/>=<sp/>0!\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="259"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="260"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="261"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(tmpDesc1<sp/>=<sp/>freeKernDesc;<sp/>tmpDesc1<sp/>!=<sp/>0x0;<sp/>tmpDesc1<sp/>=<sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref>)<sp/>{</highlight></codeline>
<codeline lineno="262"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(tmpDesc1);</highlight></codeline>
<codeline lineno="263"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpDesc1-&gt;<ref refid="structmemDescriptor_1a058bea66f641af082849f748d83ea065" kindref="member">limit</ref><sp/>&gt;=<sp/>len)<sp/>{</highlight></codeline>
<codeline lineno="264"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpDesc1-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>!=<sp/>0x0)</highlight></codeline>
<codeline lineno="265"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref>-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>=<sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref>;</highlight></codeline>
<codeline lineno="266"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpDesc1-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>!=<sp/>0x0)</highlight></codeline>
<codeline lineno="267"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref>-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref>;</highlight></codeline>
<codeline lineno="268"><highlight class="normal"></highlight></codeline>
<codeline lineno="269"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpDesc1<sp/>==<sp/>freeKernDesc)</highlight></codeline>
<codeline lineno="270"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>freeKernDesc<sp/>=<sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref>;</highlight></codeline>
<codeline lineno="271"><highlight class="normal"></highlight></codeline>
<codeline lineno="272"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="273"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>=<sp/>usedKernDesc;</highlight></codeline>
<codeline lineno="274"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(usedKernDesc<sp/>!=<sp/>0x0)</highlight></codeline>
<codeline lineno="275"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>usedKernDesc-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>tmpDesc1;</highlight></codeline>
<codeline lineno="276"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>usedKernDesc<sp/>=<sp/>tmpDesc1;</highlight></codeline>
<codeline lineno="277"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpDesc1-&gt;<ref refid="structmemDescriptor_1a058bea66f641af082849f748d83ea065" kindref="member">limit</ref><sp/>&gt;<sp/>len)<sp/>{</highlight></codeline>
<codeline lineno="278"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc2<sp/>=<sp/>getEmptyDesc();</highlight></codeline>
<codeline lineno="279"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(tmpDesc2);</highlight></codeline>
<codeline lineno="280"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc2-&gt;<ref refid="structmemDescriptor_1a058bea66f641af082849f748d83ea065" kindref="member">limit</ref><sp/>=<sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1a058bea66f641af082849f748d83ea065" kindref="member">limit</ref><sp/>-<sp/>len;</highlight></codeline>
<codeline lineno="281"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1a058bea66f641af082849f748d83ea065" kindref="member">limit</ref><sp/>=<sp/>len;</highlight></codeline>
<codeline lineno="282"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc2-&gt;<ref refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" kindref="member">baseAddr</ref><sp/>=<sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" kindref="member">baseAddr</ref><sp/>+<sp/>len;</highlight></codeline>
<codeline lineno="283"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc2-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="284"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc2-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="285"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>insertFreeDesc(tmpDesc2);</highlight></codeline>
<codeline lineno="286"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="287"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structbuf" kindref="compound">buf</ref><sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)<sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" kindref="member">baseAddr</ref>;</highlight></codeline>
<codeline lineno="288"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>for<sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1a058bea66f641af082849f748d83ea065" kindref="member">limit</ref>;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="289"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structbuf" kindref="compound">buf</ref>[i]<sp/>=<sp/>(char)<sp/>0x0;</highlight></codeline>
<codeline lineno="290"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="291"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="armv6_2spinlock_8c_1ae29ab191c93f9ead066cb462dd2e7247" kindref="member">spinUnlock</ref>(&amp;mallocSpinLock);</highlight></codeline>
<codeline lineno="292"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//kprintf(&quot;m1[%i:%i:0x%X]&quot;,tmpDesc1-&gt;limit,len,tmpDesc1-&gt;baseAddr);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="293"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(tmpDesc1-&gt;<ref refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" kindref="member">baseAddr</ref>);</highlight></codeline>
<codeline lineno="294"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(tmpDesc1-&gt;<ref refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" kindref="member">baseAddr</ref>);</highlight></codeline>
<codeline lineno="295"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="296"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="297"><highlight class="normal"><sp/><sp/>tmpDesc1<sp/>=<sp/>getEmptyDesc();</highlight></codeline>
<codeline lineno="298"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//kprintf(&quot;no<sp/>empty<sp/>desc\n&quot;);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="299"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpDesc1<sp/>!=<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="300"><highlight class="normal"><sp/><sp/><sp/><sp/>pages<sp/>=<sp/>((len<sp/>+<sp/>4095)<sp/>/<sp/>4096);</highlight></codeline>
<codeline lineno="301"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" kindref="member">baseAddr</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structmemDescriptor" kindref="compound">memDescriptor</ref><sp/>*)<sp/><ref refid="paging_8h_1a6d09af2e4df8a7165caa4c4b1895e87c" kindref="member">vmm_getFreeMallocPage</ref>(pages);</highlight></codeline>
<codeline lineno="302"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1a058bea66f641af082849f748d83ea065" kindref="member">limit</ref><sp/>=<sp/>len;</highlight></codeline>
<codeline lineno="303"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>=<sp/>usedKernDesc;</highlight></codeline>
<codeline lineno="304"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="305"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(usedKernDesc<sp/>!=<sp/>0x0)</highlight></codeline>
<codeline lineno="306"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>usedKernDesc-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>tmpDesc1;</highlight></codeline>
<codeline lineno="307"><highlight class="normal"><sp/><sp/><sp/><sp/>usedKernDesc<sp/>=<sp/>tmpDesc1;</highlight></codeline>
<codeline lineno="308"><highlight class="normal"></highlight></codeline>
<codeline lineno="309"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(((pages<sp/>*<sp/>4096)<sp/>-<sp/>len)<sp/>&gt;<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="310"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc2<sp/>=<sp/>getEmptyDesc();</highlight></codeline>
<codeline lineno="311"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(tmpDesc2);</highlight></codeline>
<codeline lineno="312"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc2-&gt;<ref refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" kindref="member">baseAddr</ref><sp/>=<sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" kindref="member">baseAddr</ref><sp/>+<sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1a058bea66f641af082849f748d83ea065" kindref="member">limit</ref>;</highlight></codeline>
<codeline lineno="313"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc2-&gt;<ref refid="structmemDescriptor_1a058bea66f641af082849f748d83ea065" kindref="member">limit</ref><sp/>=<sp/>((pages<sp/>*<sp/>4096)<sp/>-<sp/>len);</highlight></codeline>
<codeline lineno="314"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc2-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="315"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc2-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="316"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpDesc2-&gt;<ref refid="structmemDescriptor_1a058bea66f641af082849f748d83ea065" kindref="member">limit</ref><sp/>&lt;=<sp/>0x0)</highlight></codeline>
<codeline lineno="317"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;kmalloc-2<sp/>tmpDesc2:<sp/>[%i]\n&quot;</highlight><highlight class="normal">,<sp/>tmpDesc2-&gt;<ref refid="structmemDescriptor_1a058bea66f641af082849f748d83ea065" kindref="member">limit</ref>);</highlight></codeline>
<codeline lineno="318"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>insertFreeDesc(tmpDesc2);</highlight></codeline>
<codeline lineno="319"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="320"><highlight class="normal"></highlight></codeline>
<codeline lineno="321"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structbuf" kindref="compound">buf</ref><sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)<sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" kindref="member">baseAddr</ref>;</highlight></codeline>
<codeline lineno="322"><highlight class="normal"><sp/><sp/><sp/><sp/>for<sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>tmpDesc1-&gt;<ref refid="structmemDescriptor_1a058bea66f641af082849f748d83ea065" kindref="member">limit</ref>;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="323"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structbuf" kindref="compound">buf</ref>[i]<sp/>=<sp/>(char)<sp/>0x0;</highlight></codeline>
<codeline lineno="324"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="325"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="armv6_2spinlock_8c_1ae29ab191c93f9ead066cb462dd2e7247" kindref="member">spinUnlock</ref>(&amp;mallocSpinLock);</highlight></codeline>
<codeline lineno="326"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//kprintf(&quot;baseAddr2[0x%X:0x%X]&quot;,tmpDesc1,tmpDesc1-&gt;baseAddr);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="327"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//kprintf(&quot;m2[%i:%i:0x%X]&quot;,tmpDesc1-&gt;limit,len,tmpDesc1-&gt;baseAddr);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="328"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(tmpDesc1-&gt;<ref refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" kindref="member">baseAddr</ref>);</highlight></codeline>
<codeline lineno="329"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(tmpDesc1-&gt;<ref refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" kindref="member">baseAddr</ref>);</highlight></codeline>
<codeline lineno="330"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="331"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//Return<sp/>Null<sp/>If<sp/>Unable<sp/>To<sp/>Malloc</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="332"><highlight class="normal"><sp/><sp/><ref refid="armv6_2spinlock_8c_1ae29ab191c93f9ead066cb462dd2e7247" kindref="member">spinUnlock</ref>(&amp;mallocSpinLock);</highlight></codeline>
<codeline lineno="333"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//kprintf(&quot;baseAddr3[0x0]&quot;);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="334"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="335"><highlight class="normal">}</highlight></codeline>
<codeline lineno="336"><highlight class="normal"></highlight></codeline>
<codeline lineno="337"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="338"><highlight class="comment"></highlight></codeline>
<codeline lineno="339"><highlight class="comment"><sp/>Function:<sp/>void<sp/>kfree(void<sp/>*baseAddr)</highlight></codeline>
<codeline lineno="340"><highlight class="comment"><sp/>Description:<sp/>This<sp/>Will<sp/>Find<sp/>The<sp/>Descriptor<sp/>And<sp/>Free<sp/>It</highlight></codeline>
<codeline lineno="341"><highlight class="comment"></highlight></codeline>
<codeline lineno="342" refid="kmalloc_8c_1aaa9ed6886459604cf73ccdbf6410e487" refkind="member"><highlight class="comment"><sp/>Notes:</highlight></codeline>
<codeline lineno="343"><highlight class="comment"></highlight></codeline>
<codeline lineno="344"><highlight class="comment"><sp/>02/17/03<sp/>-<sp/>I<sp/>need<sp/>To<sp/>Make<sp/>It<sp/>Join<sp/>Descriptors</highlight></codeline>
<codeline lineno="345"><highlight class="comment"></highlight></codeline>
<codeline lineno="346"><highlight class="comment"><sp/>************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="347"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="kmalloc_8c_1aaa9ed6886459604cf73ccdbf6410e487" kindref="member">kfree</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*<ref refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" kindref="member">baseAddr</ref>)<sp/>{</highlight></codeline>
<codeline lineno="348"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structmemDescriptor" kindref="compound">memDescriptor</ref><sp/>*tmpDesc<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="349"><highlight class="normal"></highlight></codeline>
<codeline lineno="350"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" kindref="member">baseAddr</ref><sp/>==<sp/>0x0)</highlight></codeline>
<codeline lineno="351"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="352"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(<ref refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" kindref="member">baseAddr</ref>);</highlight></codeline>
<codeline lineno="353"><highlight class="normal"></highlight></codeline>
<codeline lineno="354"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(usedKernDesc);</highlight></codeline>
<codeline lineno="355"><highlight class="normal"><sp/><sp/><ref refid="armv6_2spinlock_8c_1a71f03d2ba55111c715b6068254847a53" kindref="member">spinLock</ref>(&amp;mallocSpinLock);</highlight></codeline>
<codeline lineno="356"><highlight class="normal"></highlight></codeline>
<codeline lineno="357"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(tmpDesc<sp/>=<sp/>usedKernDesc;<sp/>tmpDesc<sp/>!=<sp/>0x0;<sp/>tmpDesc<sp/>=<sp/>tmpDesc-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref>)<sp/>{</highlight></codeline>
<codeline lineno="358"><highlight class="normal"></highlight></codeline>
<codeline lineno="359"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpDesc-&gt;<ref refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" kindref="member">baseAddr</ref><sp/>==<sp/><ref refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" kindref="member">baseAddr</ref>)<sp/>{</highlight></codeline>
<codeline lineno="360"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="string_8h_1ace4b911463887af5e748326323e99a23" kindref="member">memset</ref>(tmpDesc-&gt;<ref refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" kindref="member">baseAddr</ref>,<sp/>0xBE,<sp/>tmpDesc-&gt;<ref refid="structmemDescriptor_1a058bea66f641af082849f748d83ea065" kindref="member">limit</ref>);</highlight></codeline>
<codeline lineno="361"><highlight class="normal"></highlight></codeline>
<codeline lineno="362"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(usedKernDesc<sp/>==<sp/>tmpDesc)</highlight></codeline>
<codeline lineno="363"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>usedKernDesc<sp/>=<sp/>tmpDesc-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref>;</highlight></codeline>
<codeline lineno="364"><highlight class="normal"></highlight></codeline>
<codeline lineno="365"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpDesc-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>!=<sp/>0x0)</highlight></codeline>
<codeline lineno="366"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref>-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>=<sp/>tmpDesc-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref>;</highlight></codeline>
<codeline lineno="367"><highlight class="normal"></highlight></codeline>
<codeline lineno="368"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpDesc-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>!=<sp/>0x0)</highlight></codeline>
<codeline lineno="369"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref>-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>tmpDesc-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref>;</highlight></codeline>
<codeline lineno="370"><highlight class="normal"></highlight></codeline>
<codeline lineno="371"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc-&gt;<ref refid="structmemDescriptor_1afef7871e9eb4790c4593ddfaddcd028f" kindref="member">next</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="372"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tmpDesc-&gt;<ref refid="structmemDescriptor_1a1c3d40435fbd7093299235a8684d8b66" kindref="member">prev</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="373"><highlight class="normal"></highlight></codeline>
<codeline lineno="374"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpDesc-&gt;<ref refid="structmemDescriptor_1a058bea66f641af082849f748d83ea065" kindref="member">limit</ref><sp/>&lt;=<sp/>0x0)</highlight></codeline>
<codeline lineno="375"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;kfree<sp/>tmpDesc1:<sp/>[%i]\n&quot;</highlight><highlight class="normal">,<sp/>tmpDesc-&gt;<ref refid="structmemDescriptor_1a058bea66f641af082849f748d83ea065" kindref="member">limit</ref>);</highlight></codeline>
<codeline lineno="376"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//kprintf(&quot;{0x%X}&quot;,tmpDesc-&gt;baseAddr);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="377"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>insertFreeDesc(tmpDesc);</highlight></codeline>
<codeline lineno="378"><highlight class="normal"></highlight></codeline>
<codeline lineno="379"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>mergeMemBlocks();</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="380"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="armv6_2spinlock_8c_1ae29ab191c93f9ead066cb462dd2e7247" kindref="member">spinUnlock</ref>(&amp;mallocSpinLock);</highlight></codeline>
<codeline lineno="381"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="382"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="383"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="384"><highlight class="normal"><sp/><sp/><ref refid="armv6_2spinlock_8c_1ae29ab191c93f9ead066cb462dd2e7247" kindref="member">spinUnlock</ref>(&amp;mallocSpinLock);</highlight></codeline>
<codeline lineno="385"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Kernel:<sp/>Error<sp/>Freeing<sp/>Descriptor!<sp/>[0x%X]\n&quot;</highlight><highlight class="normal">,<sp/>(<ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref>)<sp/><ref refid="structmemDescriptor_1aa1d1c6fe6d86d782b64c1ca467250cb9" kindref="member">baseAddr</ref>);</highlight></codeline>
<codeline lineno="386"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="387"><highlight class="normal">}</highlight></codeline>
<codeline lineno="388"><highlight class="normal"></highlight></codeline>
<codeline lineno="389"><highlight class="normal"></highlight><highlight class="comment">/***</highlight></codeline>
<codeline lineno="390"><highlight class="comment"><sp/>$Log:<sp/>kmalloc.c,v<sp/>$</highlight></codeline>
<codeline lineno="391"><highlight class="comment"><sp/>Revision<sp/>1.3<sp/><sp/>2006/12/05<sp/>14:10:21<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="392"><highlight class="comment"><sp/>Workign<sp/>Distro</highlight></codeline>
<codeline lineno="393"><highlight class="comment"></highlight></codeline>
<codeline lineno="394"><highlight class="comment"><sp/>Revision<sp/>1.2<sp/><sp/>2006/10/06<sp/>15:48:01<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="395"><highlight class="comment"><sp/>Starting<sp/>to<sp/>make<sp/>ubixos<sp/>work<sp/>with<sp/>UFS2</highlight></codeline>
<codeline lineno="396"><highlight class="comment"></highlight></codeline>
<codeline lineno="397"><highlight class="comment"><sp/>Revision<sp/>1.1.1.1<sp/><sp/>2006/06/01<sp/>12:46:16<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="398"><highlight class="comment"><sp/>ubix2</highlight></codeline>
<codeline lineno="399"><highlight class="comment"></highlight></codeline>
<codeline lineno="400"><highlight class="comment"><sp/>Revision<sp/>1.4<sp/><sp/>2006/06/01<sp/>12:42:09<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="401"><highlight class="comment"><sp/>Getting<sp/>back<sp/>to<sp/>the<sp/>basics</highlight></codeline>
<codeline lineno="402"><highlight class="comment"></highlight></codeline>
<codeline lineno="403"><highlight class="comment"><sp/>Revision<sp/>1.3<sp/><sp/>2006/06/01<sp/>03:58:33<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="404"><highlight class="comment"><sp/>wondering<sp/>about<sp/>this<sp/>stuff<sp/>here</highlight></codeline>
<codeline lineno="405"><highlight class="comment"></highlight></codeline>
<codeline lineno="406"><highlight class="comment"><sp/>Revision<sp/>1.2<sp/><sp/>2005/10/12<sp/>00:13:37<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="407"><highlight class="comment"><sp/>Removed</highlight></codeline>
<codeline lineno="408"><highlight class="comment"></highlight></codeline>
<codeline lineno="409"><highlight class="comment"><sp/>Revision<sp/>1.1.1.1<sp/><sp/>2005/09/26<sp/>17:24:11<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="410"><highlight class="comment"><sp/>no<sp/>message</highlight></codeline>
<codeline lineno="411"><highlight class="comment"></highlight></codeline>
<codeline lineno="412"><highlight class="comment"><sp/>Revision<sp/>1.35<sp/><sp/>2005/08/04<sp/>18:32:59<sp/><sp/>fsdfs</highlight></codeline>
<codeline lineno="413"><highlight class="comment"></highlight></codeline>
<codeline lineno="414"><highlight class="comment"><sp/>added<sp/>error<sp/>reporting</highlight></codeline>
<codeline lineno="415"><highlight class="comment"></highlight></codeline>
<codeline lineno="416"><highlight class="comment"><sp/>Revision<sp/>1.34<sp/><sp/>2005/08/04<sp/>18:23:41<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="417"><highlight class="comment"><sp/>BUG:<sp/>Assert<sp/>has<sp/>issues<sp/>that<sp/>must<sp/>be<sp/>looked<sp/>into</highlight></codeline>
<codeline lineno="418"><highlight class="comment"></highlight></codeline>
<codeline lineno="419"><highlight class="comment"><sp/>Revision<sp/>1.33<sp/><sp/>2005/08/04<sp/>17:11:11<sp/><sp/>fsdfs</highlight></codeline>
<codeline lineno="420"><highlight class="comment"></highlight></codeline>
<codeline lineno="421"><highlight class="comment"><sp/>----------------------------------------</highlight></codeline>
<codeline lineno="422"><highlight class="comment"></highlight></codeline>
<codeline lineno="423"><highlight class="comment"><sp/>-------------------</highlight></codeline>
<codeline lineno="424"><highlight class="comment"></highlight></codeline>
<codeline lineno="425"><highlight class="comment"><sp/>Revision<sp/>1.32<sp/><sp/>2004/09/28<sp/>21:50:04<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="426"><highlight class="comment"><sp/>kmalloc:<sp/>now<sp/>when<sp/>we<sp/>kfree<sp/>memory<sp/>is<sp/>filled<sp/>with<sp/>0xBE<sp/>so<sp/>it<sp/>is<sp/>easy<sp/>to<sp/>debug<sp/>if<sp/>we<sp/>continue<sp/>to<sp/>use<sp/>free&apos;d<sp/>memory</highlight></codeline>
<codeline lineno="427"><highlight class="comment"></highlight></codeline>
<codeline lineno="428"><highlight class="comment"><sp/>Revision<sp/>1.31<sp/><sp/>2004/09/19<sp/>16:17:25<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="429"><highlight class="comment"><sp/>fixed<sp/>memory<sp/>leak<sp/>we<sp/>now<sp/>lose<sp/>no<sp/>memory....</highlight></codeline>
<codeline lineno="430"><highlight class="comment"></highlight></codeline>
<codeline lineno="431"><highlight class="comment"><sp/>Revision<sp/>1.30<sp/><sp/>2004/09/14<sp/>21:51:24<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="432"><highlight class="comment"><sp/>Debug<sp/>info</highlight></codeline>
<codeline lineno="433"><highlight class="comment"></highlight></codeline>
<codeline lineno="434"><highlight class="comment"><sp/>Revision<sp/>1.29<sp/><sp/>2004/09/11<sp/>23:39:31<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="435"><highlight class="comment"><sp/>ok<sp/>time<sp/>for<sp/>bed</highlight></codeline>
<codeline lineno="436"><highlight class="comment"></highlight></codeline>
<codeline lineno="437"><highlight class="comment"><sp/>Revision<sp/>1.28<sp/><sp/>2004/09/11<sp/>23:21:26<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="438"><highlight class="comment"><sp/>run<sp/>now<sp/>do<sp/>you<sp/>get<sp/>fegfaults<sp/>with<sp/>BB?</highlight></codeline>
<codeline lineno="439"><highlight class="comment"></highlight></codeline>
<codeline lineno="440"><highlight class="comment"><sp/>Revision<sp/>1.27<sp/><sp/>2004/09/11<sp/>22:49:28<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="441"><highlight class="comment"><sp/>pat<sp/>look<sp/>at<sp/>lines<sp/>276-285<sp/><sp/>does<sp/>the<sp/>math<sp/>seem<sp/>right?</highlight></codeline>
<codeline lineno="442"><highlight class="comment"></highlight></codeline>
<codeline lineno="443"><highlight class="comment"><sp/>Revision<sp/>1.26<sp/><sp/>2004/09/11<sp/>22:33:13<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="444"><highlight class="comment"><sp/>minor<sp/>changes</highlight></codeline>
<codeline lineno="445"><highlight class="comment"></highlight></codeline>
<codeline lineno="446"><highlight class="comment"><sp/>Revision<sp/>1.25<sp/><sp/>2004/09/11<sp/>12:11:11<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="447"><highlight class="comment"><sp/>Cleaning<sp/>up<sp/>the<sp/>VFS<sp/>more<sp/>changes<sp/>to<sp/>follow...</highlight></codeline>
<codeline lineno="448"><highlight class="comment"></highlight></codeline>
<codeline lineno="449"><highlight class="comment"><sp/>Revision<sp/>1.24<sp/><sp/>2004/09/08<sp/>23:19:58<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="450"><highlight class="comment"><sp/>hmm</highlight></codeline>
<codeline lineno="451"><highlight class="comment"></highlight></codeline>
<codeline lineno="452"><highlight class="comment"><sp/>Revision<sp/>1.23<sp/><sp/>2004/09/06<sp/>15:13:25<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="453"><highlight class="comment"><sp/>Last<sp/>commit<sp/>before<sp/>FreeBSD<sp/>6.0</highlight></codeline>
<codeline lineno="454"><highlight class="comment"></highlight></codeline>
<codeline lineno="455"><highlight class="comment"><sp/>Revision<sp/>1.22<sp/><sp/>2004/08/26<sp/>22:51:18<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="456"><highlight class="comment"><sp/>TCA<sp/>touched<sp/>me<sp/>:(<sp/>i<sp/>think<sp/>he<sp/>likes<sp/>men....</highlight></codeline>
<codeline lineno="457"><highlight class="comment"></highlight></codeline>
<codeline lineno="458"><highlight class="comment"></highlight></codeline>
<codeline lineno="459"><highlight class="comment"><sp/>sched.h:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>kTask_t<sp/>added<sp/>parentPid</highlight></codeline>
<codeline lineno="460"><highlight class="comment"><sp/>endtask.c:<sp/><sp/><sp/><sp/><sp/>fixed<sp/>term<sp/>back<sp/>to<sp/>parentPid</highlight></codeline>
<codeline lineno="461"><highlight class="comment"><sp/>exec.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cleaned<sp/>warnings</highlight></codeline>
<codeline lineno="462"><highlight class="comment"><sp/>fork.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fixed<sp/>term<sp/>to<sp/>childPid</highlight></codeline>
<codeline lineno="463"><highlight class="comment"><sp/>sched.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>clean<sp/>up<sp/>for<sp/>dead<sp/>tasks</highlight></codeline>
<codeline lineno="464"><highlight class="comment"><sp/>systemtask.c:<sp/>clean<sp/>up<sp/>dead<sp/>tasks</highlight></codeline>
<codeline lineno="465"><highlight class="comment"><sp/>kmalloc.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/>cleaned<sp/>up<sp/>warnings</highlight></codeline>
<codeline lineno="466"><highlight class="comment"><sp/>udp.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cleaned<sp/>up<sp/>warnings</highlight></codeline>
<codeline lineno="467"><highlight class="comment"><sp/>bot.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cleaned<sp/>up<sp/>warnings</highlight></codeline>
<codeline lineno="468"><highlight class="comment"><sp/>shell.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cleaned<sp/>up<sp/>warnings</highlight></codeline>
<codeline lineno="469"><highlight class="comment"><sp/>tcpdump.c:<sp/><sp/><sp/><sp/><sp/>took<sp/>a<sp/>dump</highlight></codeline>
<codeline lineno="470"><highlight class="comment"><sp/>hd.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cleaned<sp/>up<sp/>warnings</highlight></codeline>
<codeline lineno="471"><highlight class="comment"><sp/>ubixfs.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stopped<sp/>prning<sp/>debug<sp/>info</highlight></codeline>
<codeline lineno="472"><highlight class="comment"></highlight></codeline>
<codeline lineno="473"><highlight class="comment"><sp/>Revision<sp/>1.21<sp/><sp/>2004/07/28<sp/>15:05:43<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="474"><highlight class="comment"><sp/>Major:</highlight></codeline>
<codeline lineno="475"><highlight class="comment"><sp/>Pages<sp/>now<sp/>have<sp/>strict<sp/>security<sp/>enforcement.</highlight></codeline>
<codeline lineno="476"><highlight class="comment"><sp/>Many<sp/>null<sp/>dereferences<sp/>have<sp/>been<sp/>resolved.</highlight></codeline>
<codeline lineno="477"><highlight class="comment"><sp/>When<sp/>apps<sp/>loaded<sp/>permissions<sp/>set<sp/>for<sp/>pages<sp/>rw<sp/>and<sp/>ro</highlight></codeline>
<codeline lineno="478"><highlight class="comment"></highlight></codeline>
<codeline lineno="479"><highlight class="comment"><sp/>Revision<sp/>1.20<sp/><sp/>2004/07/28<sp/>00:17:05<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="480"><highlight class="comment"><sp/>Major:</highlight></codeline>
<codeline lineno="481"><highlight class="comment"><sp/>Disconnected<sp/>page<sp/>0x0<sp/>from<sp/>the<sp/>system...<sp/>Unfortunately<sp/>this<sp/>broke<sp/>many<sp/>things</highlight></codeline>
<codeline lineno="482"><highlight class="comment"><sp/>all<sp/>of<sp/>which<sp/>have<sp/>been<sp/>fixed.<sp/>This<sp/>was<sp/>good<sp/>because<sp/>nothing<sp/>deferences<sp/>NULL</highlight></codeline>
<codeline lineno="483"><highlight class="comment"><sp/>any<sp/>more.</highlight></codeline>
<codeline lineno="484"><highlight class="comment"></highlight></codeline>
<codeline lineno="485"><highlight class="comment"><sp/>Things<sp/>affected:</highlight></codeline>
<codeline lineno="486"><highlight class="comment"><sp/>malloc,kmalloc,getfreepage,getfreevirtualpage,pagefault,fork,exec,ld,ld.so,exec,file</highlight></codeline>
<codeline lineno="487"><highlight class="comment"></highlight></codeline>
<codeline lineno="488"><highlight class="comment"><sp/>Revision<sp/>1.19<sp/><sp/>2004/07/26<sp/>19:15:49<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="489"><highlight class="comment"><sp/>test<sp/>code,<sp/>fixes<sp/>and<sp/>the<sp/>like</highlight></codeline>
<codeline lineno="490"><highlight class="comment"></highlight></codeline>
<codeline lineno="491"><highlight class="comment"><sp/>Revision<sp/>1.18<sp/><sp/>2004/07/26<sp/>16:52:45<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="492"><highlight class="comment"><sp/>here<sp/>we<sp/>go</highlight></codeline>
<codeline lineno="493"><highlight class="comment"></highlight></codeline>
<codeline lineno="494"><highlight class="comment"><sp/>Revision<sp/>1.17<sp/><sp/>2004/07/24<sp/>23:04:44<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="495"><highlight class="comment"><sp/>Changes...<sp/>mark<sp/>let<sp/>me<sp/>know<sp/>if<sp/>you<sp/>fault<sp/>at<sp/>pid<sp/>185<sp/>when<sp/>you<sp/>type<sp/>stress</highlight></codeline>
<codeline lineno="496"><highlight class="comment"></highlight></codeline>
<codeline lineno="497"><highlight class="comment"><sp/>Revision<sp/>1.16<sp/><sp/>2004/07/21<sp/>10:02:09<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="498"><highlight class="comment"><sp/>devfs:<sp/>renamed<sp/>functions</highlight></codeline>
<codeline lineno="499"><highlight class="comment"><sp/>device<sp/>system:<sp/>renamed<sp/>functions</highlight></codeline>
<codeline lineno="500"><highlight class="comment"><sp/>fdc:<sp/>fixed<sp/>a<sp/>few<sp/>potential<sp/>bugs<sp/>and<sp/>cleaned<sp/>up<sp/>some<sp/>unused<sp/>variables</highlight></codeline>
<codeline lineno="501"><highlight class="comment"><sp/>strol:<sp/>fixed<sp/>definition</highlight></codeline>
<codeline lineno="502"><highlight class="comment"><sp/>endtask:<sp/>made<sp/>it<sp/>print<sp/>out<sp/>freepage<sp/>debug<sp/>info</highlight></codeline>
<codeline lineno="503"><highlight class="comment"><sp/>kmalloc:<sp/>fixed<sp/>a<sp/>huge<sp/>memory<sp/>leak<sp/>we<sp/>had<sp/>some<sp/>unhandled<sp/>descriptor<sp/>insertion<sp/>so<sp/>some<sp/>descriptors<sp/>were<sp/>lost</highlight></codeline>
<codeline lineno="504"><highlight class="comment"><sp/>ld:<sp/>fixed<sp/>a<sp/>pointer<sp/>conversion</highlight></codeline>
<codeline lineno="505"><highlight class="comment"><sp/>file:<sp/>cleaned<sp/>up<sp/>a<sp/>few<sp/>unused<sp/>variables</highlight></codeline>
<codeline lineno="506"><highlight class="comment"><sp/>sched:<sp/>broke<sp/>task<sp/>deletion</highlight></codeline>
<codeline lineno="507"><highlight class="comment"><sp/>kprintf:<sp/>fixed<sp/>ogPrintf<sp/>definition</highlight></codeline>
<codeline lineno="508"><highlight class="comment"></highlight></codeline>
<codeline lineno="509"><highlight class="comment"><sp/>Revision<sp/>1.15<sp/><sp/>2004/07/20<sp/>23:20:50<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="510"><highlight class="comment"><sp/>kmalloc:<sp/>forgot<sp/>to<sp/>remove<sp/>an<sp/>assert</highlight></codeline>
<codeline lineno="511"><highlight class="comment"></highlight></codeline>
<codeline lineno="512"><highlight class="comment"><sp/>Revision<sp/>1.14<sp/><sp/>2004/07/20<sp/>23:18:11<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="513"><highlight class="comment"><sp/>Made<sp/>malloc<sp/>a<sp/>little<sp/>more<sp/>robust<sp/>but<sp/>we<sp/>have<sp/>a<sp/>serious<sp/>memory<sp/>leak<sp/>somewhere</highlight></codeline>
<codeline lineno="514"><highlight class="comment"></highlight></codeline>
<codeline lineno="515"><highlight class="comment"><sp/>Revision<sp/>1.13<sp/><sp/>2004/07/20<sp/>22:29:55<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="516"><highlight class="comment"><sp/>assert:<sp/>remade<sp/>assert</highlight></codeline>
<codeline lineno="517"><highlight class="comment"></highlight></codeline>
<codeline lineno="518"><highlight class="comment"><sp/>Revision<sp/>1.12<sp/><sp/>2004/07/20<sp/>18:58:24<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="519"><highlight class="comment"><sp/>Few<sp/>fixes</highlight></codeline>
<codeline lineno="520"><highlight class="comment"></highlight></codeline>
<codeline lineno="521"><highlight class="comment"><sp/>Revision<sp/>1.11<sp/><sp/>2004/07/18<sp/>05:24:15<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="522"><highlight class="comment"><sp/>Fixens</highlight></codeline>
<codeline lineno="523"><highlight class="comment"></highlight></codeline>
<codeline lineno="524"><highlight class="comment"><sp/>Revision<sp/>1.10<sp/><sp/>2004/07/17<sp/>18:00:47<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="525"><highlight class="comment"><sp/>kmalloc:<sp/>added<sp/>assert()</highlight></codeline>
<codeline lineno="526"><highlight class="comment"></highlight></codeline>
<codeline lineno="527"><highlight class="comment"><sp/>Revision<sp/>1.9<sp/><sp/>2004/07/17<sp/>15:54:52<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="528"><highlight class="comment"><sp/>kmalloc:<sp/>added<sp/>assert()</highlight></codeline>
<codeline lineno="529"><highlight class="comment"><sp/>bioscall:<sp/>fixed<sp/>some<sp/>potential<sp/>problem<sp/>by<sp/>not<sp/>making<sp/>16bit<sp/>code</highlight></codeline>
<codeline lineno="530"><highlight class="comment"><sp/>paging:<sp/>added<sp/>assert()</highlight></codeline>
<codeline lineno="531"><highlight class="comment"></highlight></codeline>
<codeline lineno="532"><highlight class="comment"><sp/>Revision<sp/>1.8<sp/><sp/>2004/06/17<sp/>14:50:32<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="533"><highlight class="comment"><sp/>kmalloc:<sp/>converted<sp/>some<sp/>variables<sp/>to<sp/>static</highlight></codeline>
<codeline lineno="534"><highlight class="comment"></highlight></codeline>
<codeline lineno="535"><highlight class="comment"><sp/>Revision<sp/>1.7<sp/><sp/>2004/06/17<sp/>02:54:54<sp/><sp/>flameshadow</highlight></codeline>
<codeline lineno="536"><highlight class="comment"><sp/>chg:<sp/>fixed<sp/>cast</highlight></codeline>
<codeline lineno="537"><highlight class="comment"></highlight></codeline>
<codeline lineno="538"><highlight class="comment"><sp/>Revision<sp/>1.6<sp/><sp/>2004/05/26<sp/>11:56:51<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="539"><highlight class="comment"><sp/>kmalloc:<sp/>fixed<sp/>memrgeMemBlocks<sp/>hopefully<sp/>it<sp/>will<sp/>prevent<sp/>future<sp/>segfault<sp/>issues</highlight></codeline>
<codeline lineno="540"><highlight class="comment"><sp/>by<sp/>not<sp/>having<sp/>any<sp/>more<sp/>overlapping<sp/>blocks</highlight></codeline>
<codeline lineno="541"><highlight class="comment"></highlight></codeline>
<codeline lineno="542"><highlight class="comment"><sp/>Revision<sp/>1.5<sp/><sp/>2004/05/25<sp/>14:01:14<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="543"><highlight class="comment"><sp/>Implimented<sp/>Better<sp/>Spinlocking<sp/>No<sp/>More<sp/>Issues<sp/>With<sp/>KMALLOC<sp/>which<sp/>actually</highlight></codeline>
<codeline lineno="544"><highlight class="comment"><sp/>was<sp/>causing<sp/>bizzare<sp/>problems</highlight></codeline>
<codeline lineno="545"><highlight class="comment"></highlight></codeline>
<codeline lineno="546"><highlight class="comment"><sp/>END</highlight></codeline>
<codeline lineno="547"><highlight class="comment"><sp/>***/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="548"><highlight class="normal"></highlight></codeline>
    </programlisting>
    <location file="C:/Dev/git/UbixOS/sys/lib/kmalloc.c"/>
  </compounddef>
</doxygen>
