<?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="memp_8c" kind="file" language="C++">
    <compoundname>memp.c</compoundname>
    <includes refid="opt_8h" local="yes">net/opt.h</includes>
    <includes refid="memp_8h" local="yes">net/memp.h</includes>
    <includes refid="sys_8h" local="yes">net/sys.h</includes>
    <includes refid="stats_8h" local="yes">net/stats.h</includes>
    <includes refid="string_8h" local="no">string.h</includes>
    <includes refid="pbuf_8h" local="yes">net/pbuf.h</includes>
    <includes refid="raw_8h" local="yes">net/raw.h</includes>
    <includes refid="udp_8h" local="yes">net/udp.h</includes>
    <includes refid="tcp_8h" local="yes">net/tcp.h</includes>
    <includes refid="tcp__priv_8h" local="yes">net/priv/tcp_priv.h</includes>
    <includes refid="ip4__frag_8h" local="yes">net/ip4_frag.h</includes>
    <includes refid="netbuf_8h" local="yes">net/netbuf.h</includes>
    <includes refid="api_8h" local="yes">net/api.h</includes>
    <includes refid="tcpip__priv_8h" local="yes">net/priv/tcpip_priv.h</includes>
    <includes refid="api__msg_8h" local="yes">net/priv/api_msg.h</includes>
    <includes refid="sockets_8h" local="yes">net/sockets.h</includes>
    <includes refid="netifapi_8h" local="yes">net/netifapi.h</includes>
    <includes refid="etharp_8h" local="yes">net/etharp.h</includes>
    <includes refid="igmp_8h" local="yes">net/igmp.h</includes>
    <includes refid="timeouts_8h" local="yes">net/timeouts.h</includes>
    <includes refid="ppp__opts_8h" local="yes">netif/ppp/ppp_opts.h</includes>
    <includes refid="netdb_8h" local="yes">net/netdb.h</includes>
    <includes refid="dns_8h" local="yes">net/dns.h</includes>
    <includes refid="nd6__priv_8h" local="yes">net/priv/nd6_priv.h</includes>
    <includes refid="ip6__frag_8h" local="yes">net/ip6_frag.h</includes>
    <includes refid="mld6_8h" local="yes">net/mld6.h</includes>
    <includes refid="memp__std_8h" local="yes">net/priv/memp_std.h</includes>
    <incdepgraph>
      <node id="39">
        <label>ufs/ufs.h</label>
        <link refid="ufs_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="40" relation="include">
        </childnode>
      </node>
      <node id="73">
        <label>net/igmp.h</label>
        <link refid="igmp_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="56" relation="include">
        </childnode>
        <childnode refid="55" relation="include">
        </childnode>
        <childnode refid="49" relation="include">
        </childnode>
      </node>
      <node id="17">
        <label>stdarg.h</label>
        <link refid="stdarg_8h"/>
      </node>
      <node id="18">
        <label>ubixos/kpanic.h</label>
        <link refid="kpanic_8h"/>
      </node>
      <node id="44">
        <label>ubixos/sem.h</label>
        <link refid="sem_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="45" relation="include">
        </childnode>
        <childnode refid="26" relation="include">
        </childnode>
      </node>
      <node id="43">
        <label>sys/tss.h</label>
        <link refid="tss_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
      </node>
      <node id="15">
        <label>sys/io.h</label>
        <link refid="io_8h"/>
      </node>
      <node id="49">
        <label>net/pbuf.h</label>
        <link refid="pbuf_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="46" relation="include">
        </childnode>
      </node>
      <node id="45">
        <label>ubixos/errno.h</label>
        <link refid="ubixos_2errno_8h"/>
      </node>
      <node id="42">
        <label>ubixos/tty.h</label>
        <link refid="tty_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
      </node>
      <node id="48">
        <label>strings.h</label>
        <link refid="strings_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
      </node>
      <node id="61">
        <label>net/ip4.h</label>
        <link refid="ip4_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="21">
        <label>net/priv/memp_priv.h</label>
        <link refid="memp__priv_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="22" relation="include">
        </childnode>
      </node>
      <node id="32">
        <label>i386/cpu.h</label>
        <link refid="i386_2cpu_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
      </node>
      <node id="69">
        <label>net/priv/api_msg.h</label>
        <link refid="api__msg_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="8">
        <label>sys/select.h</label>
        <link refid="select_8h"/>
        <childnode refid="9" relation="include">
        </childnode>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
      </node>
      <node id="76">
        <label>net/dns.h</label>
        <link refid="dns_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="35">
        <label>vfs/inode.h</label>
        <link refid="inode_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="36" relation="include">
        </childnode>
        <childnode refid="37" relation="include">
        </childnode>
        <childnode refid="38" relation="include">
        </childnode>
        <childnode refid="39" relation="include">
        </childnode>
      </node>
      <node id="53">
        <label>net/priv/tcp_priv.h</label>
        <link refid="tcp__priv_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="24">
        <label>net/sys.h</label>
        <link refid="sys_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="25" relation="include">
        </childnode>
        <childnode refid="46" relation="include">
        </childnode>
      </node>
      <node id="68">
        <label>net/timeouts.h</label>
        <link refid="timeouts_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="46" relation="include">
        </childnode>
        <childnode refid="24" relation="include">
        </childnode>
      </node>
      <node id="26">
        <label>ubixos/ubthread.h</label>
        <link refid="ubthread_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="14" relation="include">
        </childnode>
      </node>
      <node id="13">
        <label>net/arch/cc.h</label>
        <link refid="cc_8h"/>
        <childnode refid="14" relation="include">
        </childnode>
      </node>
      <node id="12">
        <label>sys/_sigset.h</label>
        <link refid="__sigset_8h"/>
        <childnode refid="7" relation="include">
        </childnode>
      </node>
      <node id="66">
        <label>net/priv/tcpip_priv.h</label>
        <link refid="tcpip__priv_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="67" relation="include">
        </childnode>
        <childnode refid="24" relation="include">
        </childnode>
        <childnode refid="68" relation="include">
        </childnode>
      </node>
      <node id="52">
        <label>net/tcp.h</label>
        <link refid="tcp_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="71">
        <label>net/netifapi.h</label>
        <link refid="netifapi_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="51">
        <label>net/udp.h</label>
        <link refid="udp_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="23">
        <label>net/stats.h</label>
        <link refid="stats_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="22" relation="include">
        </childnode>
        <childnode refid="19" relation="include">
        </childnode>
      </node>
      <node id="22">
        <label>net/mem.h</label>
        <link refid="mem_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="3">
        <label>net/lwipopts.h</label>
        <link refid="lwipopts_8h"/>
      </node>
      <node id="25">
        <label>net/arch/sys_arch.h</label>
        <link refid="sys__arch_8h"/>
        <childnode refid="26" relation="include">
        </childnode>
        <childnode refid="44" relation="include">
        </childnode>
      </node>
      <node id="65">
        <label>net/api.h</label>
        <link refid="api_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="72">
        <label>net/etharp.h</label>
        <link refid="etharp_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="41">
        <label>vfs/mount.h</label>
        <link refid="mount_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
      </node>
      <node id="34">
        <label>sys/resource.h</label>
        <link refid="resource_8h"/>
        <childnode refid="7" relation="include">
        </childnode>
      </node>
      <node id="31">
        <label>sys/trap.h</label>
        <link refid="trap_8h"/>
        <childnode refid="32" relation="include">
        </childnode>
      </node>
      <node id="47">
        <label>string.h</label>
        <link refid="string_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="48" relation="include">
        </childnode>
      </node>
      <node id="6">
        <label>sys/types.h</label>
        <link refid="include_2sys_2types_8h"/>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="8" relation="include">
        </childnode>
      </node>
      <node id="70">
        <label>net/sockets.h</label>
        <link refid="sockets_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="67">
        <label>net/tcpip.h</label>
        <link refid="tcpip_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="46" relation="include">
        </childnode>
        <childnode refid="68" relation="include">
        </childnode>
        <childnode refid="55" relation="include">
        </childnode>
      </node>
      <node id="28">
        <label>vfs/file.h</label>
        <link refid="include_2vfs_2file_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="29" relation="include">
        </childnode>
        <childnode refid="30" relation="include">
        </childnode>
        <childnode refid="35" relation="include">
        </childnode>
        <childnode refid="41" relation="include">
        </childnode>
        <childnode refid="39" relation="include">
        </childnode>
      </node>
      <node id="77">
        <label>net/priv/nd6_priv.h</label>
        <link refid="nd6__priv_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="57">
        <label>net/def.h</label>
        <link refid="def_8h"/>
        <childnode refid="5" relation="include">
        </childnode>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="55">
        <label>net/netif.h</label>
        <link refid="netif_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="46" relation="include">
        </childnode>
        <childnode refid="56" relation="include">
        </childnode>
        <childnode refid="57" relation="include">
        </childnode>
        <childnode refid="49" relation="include">
        </childnode>
        <childnode refid="23" relation="include">
        </childnode>
      </node>
      <node id="78">
        <label>net/ip6_frag.h</label>
        <link refid="ip6__frag_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="49" relation="include">
        </childnode>
        <childnode refid="59" relation="include">
        </childnode>
        <childnode refid="62" relation="include">
        </childnode>
        <childnode refid="55" relation="include">
        </childnode>
      </node>
      <node id="5">
        <label>net/arch.h</label>
        <link refid="arch_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="13" relation="include">
        </childnode>
        <childnode refid="16" relation="include">
        </childnode>
        <childnode refid="18" relation="include">
        </childnode>
      </node>
      <node id="38">
        <label>fs/msdos_fs.h</label>
        <link refid="msdos__fs_8h"/>
      </node>
      <node id="33">
        <label>sys/signal.h</label>
        <link refid="sys_2signal_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
      </node>
      <node id="62">
        <label>net/ip6.h</label>
        <link refid="ip6_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="50">
        <label>net/raw.h</label>
        <link refid="raw_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="54">
        <label>net/ip4_frag.h</label>
        <link refid="ip4__frag_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="46" relation="include">
        </childnode>
        <childnode refid="49" relation="include">
        </childnode>
        <childnode refid="55" relation="include">
        </childnode>
        <childnode refid="56" relation="include">
        </childnode>
        <childnode refid="60" relation="include">
        </childnode>
      </node>
      <node id="37">
        <label>fs/pipe_fs.h</label>
        <link refid="pipe__fs_8h"/>
      </node>
      <node id="36">
        <label>ubixos/wait.h</label>
        <link refid="wait_8h"/>
      </node>
      <node id="1">
        <label>C:/Dev/git/UbixOS/sys/net/core/memp.c</label>
        <link refid="memp_8c"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="19" relation="include">
        </childnode>
        <childnode refid="24" relation="include">
        </childnode>
        <childnode refid="23" relation="include">
        </childnode>
        <childnode refid="47" relation="include">
        </childnode>
        <childnode refid="49" relation="include">
        </childnode>
        <childnode refid="50" relation="include">
        </childnode>
        <childnode refid="51" relation="include">
        </childnode>
        <childnode refid="52" relation="include">
        </childnode>
        <childnode refid="53" relation="include">
        </childnode>
        <childnode refid="54" relation="include">
        </childnode>
        <childnode refid="64" relation="include">
        </childnode>
        <childnode refid="65" relation="include">
        </childnode>
        <childnode refid="66" relation="include">
        </childnode>
        <childnode refid="69" relation="include">
        </childnode>
        <childnode refid="70" relation="include">
        </childnode>
        <childnode refid="71" relation="include">
        </childnode>
        <childnode refid="72" relation="include">
        </childnode>
        <childnode refid="73" relation="include">
        </childnode>
        <childnode refid="68" relation="include">
        </childnode>
        <childnode refid="74" relation="include">
        </childnode>
        <childnode refid="75" relation="include">
        </childnode>
        <childnode refid="76" relation="include">
        </childnode>
        <childnode refid="77" relation="include">
        </childnode>
        <childnode refid="78" relation="include">
        </childnode>
        <childnode refid="79" relation="include">
        </childnode>
        <childnode refid="20" relation="include">
        </childnode>
      </node>
      <node id="59">
        <label>net/ip6_addr.h</label>
        <link refid="ip6__addr_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="57" relation="include">
        </childnode>
      </node>
      <node id="2">
        <label>net/opt.h</label>
        <link refid="opt_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="16">
        <label>lib/kprintf.h</label>
        <link refid="kprintf_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="17" relation="include">
        </childnode>
      </node>
      <node id="60">
        <label>net/ip.h</label>
        <link refid="ip_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="57" relation="include">
        </childnode>
        <childnode refid="49" relation="include">
        </childnode>
        <childnode refid="56" relation="include">
        </childnode>
        <childnode refid="46" relation="include">
        </childnode>
        <childnode refid="55" relation="include">
        </childnode>
        <childnode refid="61" relation="include">
        </childnode>
        <childnode refid="62" relation="include">
        </childnode>
        <childnode refid="63" relation="include">
        </childnode>
      </node>
      <node id="4">
        <label>net/debug.h</label>
        <link refid="debug_8h"/>
        <childnode refid="5" relation="include">
        </childnode>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="58">
        <label>net/ip4_addr.h</label>
        <link refid="ip4__addr_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="57" relation="include">
        </childnode>
      </node>
      <node id="56">
        <label>net/ip_addr.h</label>
        <link refid="ip__addr_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="57" relation="include">
        </childnode>
        <childnode refid="58" relation="include">
        </childnode>
        <childnode refid="59" relation="include">
        </childnode>
      </node>
      <node id="30">
        <label>sys/thread.h</label>
        <link refid="thread_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="31" relation="include">
        </childnode>
        <childnode refid="33" relation="include">
        </childnode>
        <childnode refid="34" relation="include">
        </childnode>
      </node>
      <node id="20">
        <label>net/priv/memp_std.h</label>
        <link refid="memp__std_8h"/>
      </node>
      <node id="64">
        <label>net/netbuf.h</label>
        <link refid="netbuf_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="9">
        <label>sys/cdefs.h</label>
        <link refid="cdefs_8h"/>
      </node>
      <node id="74">
        <label>netif/ppp/ppp_opts.h</label>
        <link refid="ppp__opts_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="14">
        <label>ubixos/time.h</label>
        <link refid="time_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="15" relation="include">
        </childnode>
      </node>
      <node id="27">
        <label>ubixos/sched.h</label>
        <link refid="sched_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="28" relation="include">
        </childnode>
        <childnode refid="42" relation="include">
        </childnode>
        <childnode refid="43" relation="include">
        </childnode>
        <childnode refid="30" relation="include">
        </childnode>
      </node>
      <node id="7">
        <label>sys/_types.h</label>
        <link refid="__types_8h"/>
      </node>
      <node id="63">
        <label>net/prot/ip.h</label>
        <link refid="prot_2ip_8h"/>
        <childnode refid="5" relation="include">
        </childnode>
      </node>
      <node id="46">
        <label>net/err.h</label>
        <link refid="err_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="5" relation="include">
        </childnode>
      </node>
      <node id="10">
        <label>sys/_timespec.h</label>
        <link refid="__timespec_8h"/>
        <childnode refid="7" relation="include">
        </childnode>
      </node>
      <node id="40">
        <label>sys/device.h</label>
        <link refid="include_2sys_2device_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
      </node>
      <node id="75">
        <label>net/netdb.h</label>
        <link refid="netdb_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="29">
        <label>ubixfs/dirCache.h</label>
        <link refid="dirCache_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
      </node>
      <node id="11">
        <label>sys/_timeval.h</label>
        <link refid="__timeval_8h"/>
        <childnode refid="7" relation="include">
        </childnode>
      </node>
      <node id="79">
        <label>net/mld6.h</label>
        <link refid="mld6_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="19">
        <label>net/memp.h</label>
        <link refid="memp_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="20" relation="include">
        </childnode>
        <childnode refid="21" relation="include">
        </childnode>
        <childnode refid="23" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="define">
      <memberdef kind="define" id="memp_8c_1a5f75b6e9cf0c6df9e70b08b8e05a1835" prot="public" static="no">
        <name>LWIP_MEMPOOL</name>
        <param><defname>name</defname></param>
        <param><defname>num</defname></param>
        <param><defname>size</defname></param>
        <param><defname>desc</defname></param>
        <initializer><ref refid="group__mempool_1ga5b1fb3ce7942432d87cc948b1c5ed6cb" kindref="member">LWIP_MEMPOOL_DECLARE</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,num,size,desc)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/net/core/memp.c" line="78" column="9" bodyfile="C:/Dev/git/UbixOS/sys/net/core/memp.c" bodystart="78" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="memp_8c_1a5f75b6e9cf0c6df9e70b08b8e05a1835" prot="public" static="no">
        <name>LWIP_MEMPOOL</name>
        <param><defname>name</defname></param>
        <param><defname>num</defname></param>
        <param><defname>size</defname></param>
        <param><defname>desc</defname></param>
        <initializer>&amp;memp_ ## <ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/net/core/memp.c" line="82" column="9" bodyfile="C:/Dev/git/UbixOS/sys/net/core/memp.c" bodystart="78" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="var">
      <memberdef kind="variable" id="memp_8c_1ad78a1f656a766f2c6341aa466762b883" prot="public" static="no" mutable="no">
        <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> struct <ref refid="structmemp__desc" kindref="compound">memp_desc</ref> *<ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref></type>
        <definition>const struct memp_desc* const memp_pools[MEMP_MAX]</definition>
        <argsstring>[MEMP_MAX]</argsstring>
        <name>memp_pools</name>
        <initializer>= {
#define <ref refid="memp__std_8h_1a922d258cde897fffc15fb1b4b0623e97" kindref="member">LWIP_MEMPOOL</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,num,size,desc) 

}</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/net/core/memp.c" line="81" column="29" bodyfile="C:/Dev/git/UbixOS/sys/net/core/memp.c" bodystart="81" bodyend="-1"/>
        <referencedby refid="memp_8c_1aecd94926b7c2a0e23ae195f4ae97581f" compoundref="memp_8c" startline="469" endline="496">memp_free</referencedby>
        <referencedby refid="memp_8c_1a9693e5b1ac2c6b9c0e7870522d45efa2" compoundref="memp_8c" startline="271" endline="288">memp_init</referencedby>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="memp_8c_1aa7dc20041f4327b4c349dd055c2639ba" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void do_memp_free_pool</definition>
        <argsstring>(const struct memp_desc *desc, void *mem)</argsstring>
        <name>do_memp_free_pool</name>
        <param>
          <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> struct <ref refid="structmemp__desc" kindref="compound">memp_desc</ref> *</type>
          <declname>desc</declname>
        </param>
        <param>
          <type>void *</type>
          <declname>mem</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/net/core/memp.c" line="407" column="1" bodyfile="C:/Dev/git/UbixOS/sys/net/core/memp.c" bodystart="407" bodyend="443"/>
      </memberdef>
      <memberdef kind="function" id="memp_8c_1afe2fa9da5acb435aa2d1981c340eb71a" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void *</type>
        <definition>static void* do_memp_malloc_pool</definition>
        <argsstring>(const struct memp_desc *desc)</argsstring>
        <name>do_memp_malloc_pool</name>
        <param>
          <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> struct <ref refid="structmemp__desc" kindref="compound">memp_desc</ref> *</type>
          <declname>desc</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/net/core/memp.c" line="292" column="1" bodyfile="C:/Dev/git/UbixOS/sys/net/core/memp.c" bodystart="292" bodyend="348"/>
      </memberdef>
      <memberdef kind="function" id="memp_8c_1aecd94926b7c2a0e23ae195f4ae97581f" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void memp_free</definition>
        <argsstring>(memp_t type, void *mem)</argsstring>
        <name>memp_free</name>
        <param>
          <type><ref refid="memp_8h_1a85a164b1f7764951cc685ea525114e57" kindref="member">memp_t</ref></type>
          <declname>type</declname>
        </param>
        <param>
          <type>void *</type>
          <declname>mem</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Put an element back into its pool.</para>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>type</parametername>
</parameternamelist>
<parameterdescription>
<para>the pool where to put mem </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>mem</parametername>
</parameternamelist>
<parameterdescription>
<para>the memp element to free </para>
</parameterdescription>
</parameteritem>
</parameterlist>
</para>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/net/core/memp.c" line="469" column="1" bodyfile="C:/Dev/git/UbixOS/sys/net/core/memp.c" bodystart="469" bodyend="496"/>
        <references refid="debug_8h_1a827bc03cd7889e7c007df39d33b33d18" compoundref="debug_8h" startline="135">LWIP_ERROR</references>
        <references refid="memp_8h_1a85a164b1f7764951cc685ea525114e57a3387042084427642949f3223c7ddd321" compoundref="memp_8h" startline="55">MEMP_MAX</references>
        <references refid="memp_8c_1ad78a1f656a766f2c6341aa466762b883" compoundref="memp_8c" startline="81">memp_pools</references>
        <references refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="fat__string_8h" startline="17">NULL</references>
        <references refid="structmemp__desc_1a9d6b758ce5c3b47a67a7568d38fb3926" compoundref="memp__priv_8h" startline="151">memp_desc::tab</references>
        <referencedby refid="group__pbuf_1gab0dd696fb4b6bc65e548944584f1738b" compoundref="pbuf_8c" startline="715" endline="792">pbuf_free</referencedby>
        <referencedby refid="tcpip_8c_1ac5b7a59f4c3f5f721ab9ee81f231c9fd" compoundref="tcpip_8c" startline="421" endline="423">tcpip_callbackmsg_delete</referencedby>
      </memberdef>
      <memberdef kind="function" id="memp_8c_1a62f8c3c907743e34eee3cdac7fa1eaa5" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void memp_free_pool</definition>
        <argsstring>(const struct memp_desc *desc, void *mem)</argsstring>
        <name>memp_free_pool</name>
        <param>
          <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> struct <ref refid="structmemp__desc" kindref="compound">memp_desc</ref> *</type>
          <declname>desc</declname>
        </param>
        <param>
          <type>void *</type>
          <declname>mem</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Put a custom pool element back into its pool.</para>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>desc</parametername>
</parameternamelist>
<parameterdescription>
<para>the pool where to put mem </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>mem</parametername>
</parameternamelist>
<parameterdescription>
<para>the memp element to free </para>
</parameterdescription>
</parameteritem>
</parameterlist>
</para>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/net/core/memp.c" line="452" column="1" bodyfile="C:/Dev/git/UbixOS/sys/net/core/memp.c" bodystart="452" bodyend="460"/>
        <references refid="debug_8h_1a94ad086267808462beae2b38f91996ed" compoundref="debug_8h" startline="116">LWIP_ASSERT</references>
        <references refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="fat__string_8h" startline="17">NULL</references>
      </memberdef>
      <memberdef kind="function" id="memp_8c_1a9693e5b1ac2c6b9c0e7870522d45efa2" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void memp_init</definition>
        <argsstring>(void)</argsstring>
        <name>memp_init</name>
        <param>
          <type>void</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Initializes lwIP built-in pools. Related functions: memp_malloc, memp_free</para>
<para>Carves out memp_memory into linked lists for each pool-type. </para>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/net/core/memp.c" line="271" column="1" bodyfile="C:/Dev/git/UbixOS/sys/net/core/memp.c" bodystart="271" bodyend="288"/>
        <references refid="def_8h_1a4abb61f4c9339d8a0a0c63b4fbfe6a37" compoundref="def_8h" startline="58">LWIP_ARRAYSIZE</references>
        <references refid="memp_8c_1a6416303426d05526bed33f241fa6ecd7" compoundref="memp_8c" startline="230" endline="262">memp_init_pool</references>
        <references refid="memp_8c_1ad78a1f656a766f2c6341aa466762b883" compoundref="memp_8c" startline="81">memp_pools</references>
        <referencedby refid="core_2init_8c_1a0c1a18439524d2f4a5e51d25c0ca2ce9" compoundref="core_2init_8c" startline="333" endline="381">lwip_init</referencedby>
      </memberdef>
      <memberdef kind="function" id="memp_8c_1a6416303426d05526bed33f241fa6ecd7" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void memp_init_pool</definition>
        <argsstring>(const struct memp_desc *desc)</argsstring>
        <name>memp_init_pool</name>
        <param>
          <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> struct <ref refid="structmemp__desc" kindref="compound">memp_desc</ref> *</type>
          <declname>desc</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Initialize custom memory pool. Related functions: memp_malloc_pool, memp_free_pool</para>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>desc</parametername>
</parameternamelist>
<parameterdescription>
<para>pool to initialize </para>
</parameterdescription>
</parameteritem>
</parameterlist>
</para>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/net/core/memp.c" line="230" column="1" bodyfile="C:/Dev/git/UbixOS/sys/net/core/memp.c" bodystart="230" bodyend="262"/>
        <references refid="structmemp__desc_1a9aec58adcbcd88167247296ca4346558" compoundref="memp__priv_8h" startline="148">memp_desc::base</references>
        <references refid="group__compiler__abstraction_1gaa8e8724eb1c220cbbb90de9e175ce1dc" compoundref="arch_8h" startline="236">LWIP_MEM_ALIGN</references>
        <references refid="group__compiler__abstraction_1ga70624a5deb8b9199406372a7f3603ecf" compoundref="arch_8h" startline="315">LWIP_UNUSED_ARG</references>
        <references refid="lwipopts_8h_1a27fdd01194a42fc41a7716b72cdb49e3" compoundref="lwipopts_8h" startline="63">MEMP_OVERFLOW_CHECK</references>
        <references refid="memp__priv_8h_1a7f8c378e0581aa2dc491cff52ae4fce2" compoundref="memp__priv_8h" startline="85">MEMP_SIZE</references>
        <references refid="structmemp_1a86abb86558e1cdee1bd2382f0323654d" compoundref="memp__priv_8h" startline="92">memp::next</references>
        <references refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="fat__string_8h" startline="17">NULL</references>
        <references refid="structmemp__desc_1a2c32db78e565b8812ca0e20fe929a8a7" compoundref="memp__priv_8h" startline="145">memp_desc::num</references>
        <references refid="structmemp__desc_1a1688d2bdd5a7b77700e1fa627f025ba3" compoundref="memp__priv_8h" startline="141">memp_desc::size</references>
        <references refid="structmemp__desc_1a9d6b758ce5c3b47a67a7568d38fb3926" compoundref="memp__priv_8h" startline="151">memp_desc::tab</references>
        <referencedby refid="memp_8c_1a9693e5b1ac2c6b9c0e7870522d45efa2" compoundref="memp_8c" startline="271" endline="288">memp_init</referencedby>
      </memberdef>
      <memberdef kind="function" id="memp_8c_1a2b00593d086313c267b54a976bf67aa5" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void *</type>
        <definition>void* memp_malloc</definition>
        <argsstring>(memp_t type)</argsstring>
        <name>memp_malloc</name>
        <param>
          <type><ref refid="memp_8h_1a85a164b1f7764951cc685ea525114e57" kindref="member">memp_t</ref></type>
          <declname>type</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get an element from a specific pool.</para>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>type</parametername>
</parameternamelist>
<parameterdescription>
<para>the pool to get an element from</para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>a pointer to the allocated memory or a NULL pointer on error </para>
</simplesect>
</para>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/net/core/memp.c" line="385" column="1" bodyfile="C:/Dev/git/UbixOS/sys/net/core/memp.c" bodystart="385" bodyend="404"/>
        <references refid="debug_8h_1a827bc03cd7889e7c007df39d33b33d18" compoundref="debug_8h" startline="135">LWIP_ERROR</references>
        <references refid="memp_8h_1a85a164b1f7764951cc685ea525114e57a3387042084427642949f3223c7ddd321" compoundref="memp_8h" startline="55">MEMP_MAX</references>
        <references refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="fat__string_8h" startline="17">NULL</references>
        <referencedby refid="group__pbuf_1gacfcb0a2af918658ba0afe36499c65f47" compoundref="pbuf_8c" startline="248" endline="405">pbuf_alloc</referencedby>
        <referencedby refid="tcpip_8c_1aee14fa2587a9ba9d23e4c7e16c4526ac" compoundref="tcpip_8c" startline="405" endline="414">tcpip_callbackmsg_new</referencedby>
      </memberdef>
      <memberdef kind="function" id="memp_8c_1a348c83ee972f1edf7296a1cdf1d75f22" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void *</type>
        <definition>void* memp_malloc_pool</definition>
        <argsstring>(const struct memp_desc *desc)</argsstring>
        <name>memp_malloc_pool</name>
        <param>
          <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> struct <ref refid="structmemp__desc" kindref="compound">memp_desc</ref> *</type>
          <declname>desc</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get an element from a custom pool.</para>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>desc</parametername>
</parameternamelist>
<parameterdescription>
<para>the pool to get an element from</para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>a pointer to the allocated memory or a NULL pointer on error </para>
</simplesect>
</para>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/net/core/memp.c" line="359" column="1" bodyfile="C:/Dev/git/UbixOS/sys/net/core/memp.c" bodystart="359" bodyend="374"/>
        <references refid="debug_8h_1a94ad086267808462beae2b38f91996ed" compoundref="debug_8h" startline="116">LWIP_ASSERT</references>
        <references refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="fat__string_8h" startline="17">NULL</references>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
<para>Dynamic pool memory manager</para>
<para>lwIP has dedicated pools for many structures (netconn, protocol control blocks, packet buffers, ...). All these pools are managed here. </para>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"></codeline>
<codeline lineno="14"><highlight class="comment">/*</highlight></codeline>
<codeline lineno="15"><highlight class="comment"><sp/>*<sp/>Copyright<sp/>(c)<sp/>2001-2004<sp/>Swedish<sp/>Institute<sp/>of<sp/>Computer<sp/>Science.</highlight></codeline>
<codeline lineno="16"><highlight class="comment"><sp/>*<sp/>All<sp/>rights<sp/>reserved.</highlight></codeline>
<codeline lineno="17"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="18"><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,</highlight></codeline>
<codeline lineno="19"><highlight class="comment"><sp/>*<sp/>are<sp/>permitted<sp/>provided<sp/>that<sp/>the<sp/>following<sp/>conditions<sp/>are<sp/>met:</highlight></codeline>
<codeline lineno="20"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="21"><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,</highlight></codeline>
<codeline lineno="22"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>this<sp/>list<sp/>of<sp/>conditions<sp/>and<sp/>the<sp/>following<sp/>disclaimer.</highlight></codeline>
<codeline lineno="23"><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,</highlight></codeline>
<codeline lineno="24"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>this<sp/>list<sp/>of<sp/>conditions<sp/>and<sp/>the<sp/>following<sp/>disclaimer<sp/>in<sp/>the<sp/>documentation</highlight></codeline>
<codeline lineno="25"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>and/or<sp/>other<sp/>materials<sp/>provided<sp/>with<sp/>the<sp/>distribution.</highlight></codeline>
<codeline lineno="26"><highlight class="comment"><sp/>*<sp/>3.<sp/>The<sp/>name<sp/>of<sp/>the<sp/>author<sp/>may<sp/>not<sp/>be<sp/>used<sp/>to<sp/>endorse<sp/>or<sp/>promote<sp/>products</highlight></codeline>
<codeline lineno="27"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>derived<sp/>from<sp/>this<sp/>software<sp/>without<sp/>specific<sp/>prior<sp/>written<sp/>permission.</highlight></codeline>
<codeline lineno="28"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="29"><highlight class="comment"><sp/>*<sp/>THIS<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>BY<sp/>THE<sp/>AUTHOR<sp/>``AS<sp/>IS&apos;&apos;<sp/>AND<sp/>ANY<sp/>EXPRESS<sp/>OR<sp/>IMPLIED</highlight></codeline>
<codeline lineno="30"><highlight class="comment"><sp/>*<sp/>WARRANTIES,<sp/>INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>THE<sp/>IMPLIED<sp/>WARRANTIES<sp/>OF</highlight></codeline>
<codeline lineno="31"><highlight class="comment"><sp/>*<sp/>MERCHANTABILITY<sp/>AND<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>ARE<sp/>DISCLAIMED.<sp/>IN<sp/>NO<sp/>EVENT</highlight></codeline>
<codeline lineno="32"><highlight class="comment"><sp/>*<sp/>SHALL<sp/>THE<sp/>AUTHOR<sp/>BE<sp/>LIABLE<sp/>FOR<sp/>ANY<sp/>DIRECT,<sp/>INDIRECT,<sp/>INCIDENTAL,<sp/>SPECIAL,</highlight></codeline>
<codeline lineno="33"><highlight class="comment"><sp/>*<sp/>EXEMPLARY,<sp/>OR<sp/>CONSEQUENTIAL<sp/>DAMAGES<sp/>(INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>PROCUREMENT</highlight></codeline>
<codeline lineno="34"><highlight class="comment"><sp/>*<sp/>OF<sp/>SUBSTITUTE<sp/>GOODS<sp/>OR<sp/>SERVICES;<sp/>LOSS<sp/>OF<sp/>USE,<sp/>DATA,<sp/>OR<sp/>PROFITS;<sp/>OR<sp/>BUSINESS</highlight></codeline>
<codeline lineno="35"><highlight class="comment"><sp/>*<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="36"><highlight class="comment"><sp/>*<sp/>CONTRACT,<sp/>STRICT<sp/>LIABILITY,<sp/>OR<sp/>TORT<sp/>(INCLUDING<sp/>NEGLIGENCE<sp/>OR<sp/>OTHERWISE)<sp/>ARISING</highlight></codeline>
<codeline lineno="37"><highlight class="comment"><sp/>*<sp/>IN<sp/>ANY<sp/>WAY<sp/>OUT<sp/>OF<sp/>THE<sp/>USE<sp/>OF<sp/>THIS<sp/>SOFTWARE,<sp/>EVEN<sp/>IF<sp/>ADVISED<sp/>OF<sp/>THE<sp/>POSSIBILITY</highlight></codeline>
<codeline lineno="38"><highlight class="comment"><sp/>*<sp/>OF<sp/>SUCH<sp/>DAMAGE.</highlight></codeline>
<codeline lineno="39"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="40"><highlight class="comment"><sp/>*<sp/>This<sp/>file<sp/>is<sp/>part<sp/>of<sp/>the<sp/>lwIP<sp/>TCP/IP<sp/>stack.</highlight></codeline>
<codeline lineno="41"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="42"><highlight class="comment"><sp/>*<sp/>Author:<sp/>Adam<sp/>Dunkels<sp/>&lt;adam@sics.se&gt;</highlight></codeline>
<codeline lineno="43"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="44"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="45"><highlight class="normal"></highlight></codeline>
<codeline lineno="46"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="opt_8h" kindref="compound">net/opt.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="47"><highlight class="normal"></highlight></codeline>
<codeline lineno="48"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="memp_8h" kindref="compound">net/memp.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="49"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="sys_8h" kindref="compound">net/sys.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="50"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="stats_8h" kindref="compound">net/stats.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="51"><highlight class="normal"></highlight></codeline>
<codeline lineno="52"><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="53"><highlight class="normal"></highlight></codeline>
<codeline lineno="54"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Make<sp/>sure<sp/>we<sp/>include<sp/>everything<sp/>we<sp/>need<sp/>for<sp/>size<sp/>calculation<sp/>required<sp/>by<sp/>memp_std.h<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="55"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="pbuf_8h" kindref="compound">net/pbuf.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="56"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="raw_8h" kindref="compound">net/raw.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="57"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="udp_8h" kindref="compound">net/udp.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="58"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="tcp_8h" kindref="compound">net/tcp.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="59"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="tcp__priv_8h" kindref="compound">net/priv/tcp_priv.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="60"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="ip4__frag_8h" kindref="compound">net/ip4_frag.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="61"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="netbuf_8h" kindref="compound">net/netbuf.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="62"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="api_8h" kindref="compound">net/api.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="63"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="tcpip__priv_8h" kindref="compound">net/priv/tcpip_priv.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="64"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="api__msg_8h" kindref="compound">net/priv/api_msg.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="65"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="sockets_8h" kindref="compound">net/sockets.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="66"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="netifapi_8h" kindref="compound">net/netifapi.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="67"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="etharp_8h" kindref="compound">net/etharp.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="68"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="igmp_8h" kindref="compound">net/igmp.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="69"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="timeouts_8h" kindref="compound">net/timeouts.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="70"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>needed<sp/>by<sp/>default<sp/>MEMP_NUM_SYS_TIMEOUT<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="71"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="ppp__opts_8h" kindref="compound">netif/ppp/ppp_opts.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="72"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="netdb_8h" kindref="compound">net/netdb.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="73"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="dns_8h" kindref="compound">net/dns.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="74"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="nd6__priv_8h" kindref="compound">net/priv/nd6_priv.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="75"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="ip6__frag_8h" kindref="compound">net/ip6_frag.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="76"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="mld6_8h" kindref="compound">net/mld6.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="77"><highlight class="normal"></highlight></codeline>
<codeline lineno="78" refid="memp_8c_1a5f75b6e9cf0c6df9e70b08b8e05a1835" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>LWIP_MEMPOOL(name,num,size,desc)<sp/>LWIP_MEMPOOL_DECLARE(name,num,size,desc)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="79"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="memp__std_8h" kindref="compound">net/priv/memp_std.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="80"><highlight class="normal"></highlight></codeline>
<codeline lineno="81" refid="memp_8c_1ad78a1f656a766f2c6341aa466762b883" refkind="member"><highlight class="normal"></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structmemp__desc" kindref="compound">memp_desc</ref>*<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="memp_8c_1ad78a1f656a766f2c6341aa466762b883" kindref="member">memp_pools</ref>[<ref refid="memp_8h_1a85a164b1f7764951cc685ea525114e57a3387042084427642949f3223c7ddd321" kindref="member">MEMP_MAX</ref>]<sp/>=<sp/>{</highlight></codeline>
<codeline lineno="82"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>LWIP_MEMPOOL(name,num,size,desc)<sp/>&amp;memp_<sp/>##<sp/>name,</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="83"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="memp__std_8h" kindref="compound">net/priv/memp_std.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="84"><highlight class="normal">};</highlight></codeline>
<codeline lineno="85"><highlight class="normal"></highlight></codeline>
<codeline lineno="86"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>LWIP_HOOK_FILENAME</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="87"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>LWIP_HOOK_FILENAME</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="88"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="89"><highlight class="normal"></highlight></codeline>
<codeline lineno="90"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_MEM_MALLOC<sp/>&amp;&amp;<sp/>MEMP_OVERFLOW_CHECK<sp/>&gt;=<sp/>2</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="91"><highlight class="normal"></highlight><highlight class="preprocessor">#undef<sp/>MEMP_OVERFLOW_CHECK</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="92"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>MEMP_OVERFLOW_CHECK<sp/>&gt;=<sp/>2<sp/>does<sp/>not<sp/>work<sp/>with<sp/>MEMP_MEM_MALLOC,<sp/>use<sp/>1<sp/>instead<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="93"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>MEMP_OVERFLOW_CHECK<sp/>1</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="94"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="95"><highlight class="normal"></highlight></codeline>
<codeline lineno="96"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_SANITY_CHECK<sp/>&amp;&amp;<sp/>!MEMP_MEM_MALLOC</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="97"><highlight class="normal"></highlight></codeline>
<codeline lineno="100"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="101"><highlight class="normal">memp_sanity(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structmemp__desc" kindref="compound">memp_desc</ref><sp/>*desc)</highlight></codeline>
<codeline lineno="102"><highlight class="normal">{</highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structmemp" kindref="compound">memp</ref><sp/>*t,<sp/>*h;</highlight></codeline>
<codeline lineno="104"><highlight class="normal"></highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/>t<sp/>=<sp/>*desc-&gt;<ref refid="structmemp__desc_1a9d6b758ce5c3b47a67a7568d38fb3926" kindref="member">tab</ref>;</highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t<sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="107"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(h<sp/>=<sp/>t-&gt;<ref refid="structmemp_1a86abb86558e1cdee1bd2382f0323654d" kindref="member">next</ref>;<sp/>(t<sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>&amp;&amp;<sp/>(h<sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);<sp/>t<sp/>=<sp/>t-&gt;<ref refid="structmemp_1a86abb86558e1cdee1bd2382f0323654d" kindref="member">next</ref>,</highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>h<sp/>=<sp/>((h-&gt;<ref refid="structmemp_1a86abb86558e1cdee1bd2382f0323654d" kindref="member">next</ref><sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>?<sp/>h-&gt;<ref refid="structmemp_1a86abb86558e1cdee1bd2382f0323654d" kindref="member">next</ref>-&gt;<ref refid="structmemp_1a86abb86558e1cdee1bd2382f0323654d" kindref="member">next</ref><sp/>:<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>))<sp/>{</highlight></codeline>
<codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t<sp/>==<sp/>h)<sp/>{</highlight></codeline>
<codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="114"><highlight class="normal"></highlight></codeline>
<codeline lineno="115"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>1;</highlight></codeline>
<codeline lineno="116"><highlight class="normal">}</highlight></codeline>
<codeline lineno="117"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>MEMP_SANITY_CHECK<sp/>&amp;&amp;<sp/>!MEMP_MEM_MALLOC<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="118"><highlight class="normal"></highlight></codeline>
<codeline lineno="119"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_OVERFLOW_CHECK</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="120"><highlight class="normal"></highlight></codeline>
<codeline lineno="127"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="128"><highlight class="normal">memp_overflow_check_element_overflow(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structmemp" kindref="compound">memp</ref><sp/>*p,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structmemp__desc" kindref="compound">memp_desc</ref><sp/>*desc)</highlight></codeline>
<codeline lineno="129"><highlight class="normal">{</highlight></codeline>
<codeline lineno="130"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_SANITY_REGION_AFTER_ALIGNED<sp/>&gt;<sp/>0</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="131"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>k;</highlight></codeline>
<codeline lineno="132"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>*m;</highlight></codeline>
<codeline lineno="133"><highlight class="normal"><sp/><sp/>m<sp/>=<sp/>(<ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref>*)p<sp/>+<sp/><ref refid="memp__priv_8h_1a7f8c378e0581aa2dc491cff52ae4fce2" kindref="member">MEMP_SIZE</ref><sp/>+<sp/>desc-&gt;<ref refid="structmemp__desc_1a1688d2bdd5a7b77700e1fa627f025ba3" kindref="member">size</ref>;</highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/>for<sp/>(k<sp/>=<sp/>0;<sp/>k<sp/>&lt;<sp/>MEMP_SANITY_REGION_AFTER_ALIGNED;<sp/>k++)<sp/>{</highlight></codeline>
<codeline lineno="135"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(m[k]<sp/>!=<sp/>0xcd)<sp/>{</highlight></codeline>
<codeline lineno="136"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>errstr[128]<sp/>=<sp/></highlight><highlight class="stringliteral">&quot;detected<sp/>memp<sp/>overflow<sp/>in<sp/>pool<sp/>&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="137"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>strcat(errstr,<sp/>desc-&gt;desc);</highlight></codeline>
<codeline lineno="138"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(errstr,<sp/>0);</highlight></codeline>
<codeline lineno="139"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="140"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="141"><highlight class="normal"></highlight><highlight class="preprocessor">#else<sp/></highlight><highlight class="comment">/*<sp/>MEMP_SANITY_REGION_AFTER_ALIGNED<sp/>&gt;<sp/>0<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="142"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga70624a5deb8b9199406372a7f3603ecf" kindref="member">LWIP_UNUSED_ARG</ref>(p);</highlight></codeline>
<codeline lineno="143"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga70624a5deb8b9199406372a7f3603ecf" kindref="member">LWIP_UNUSED_ARG</ref>(desc);</highlight></codeline>
<codeline lineno="144"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>MEMP_SANITY_REGION_AFTER_ALIGNED<sp/>&gt;<sp/>0<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="145"><highlight class="normal">}</highlight></codeline>
<codeline lineno="146"><highlight class="normal"></highlight></codeline>
<codeline lineno="154"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="155"><highlight class="normal">memp_overflow_check_element_underflow(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structmemp" kindref="compound">memp</ref><sp/>*p,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structmemp__desc" kindref="compound">memp_desc</ref><sp/>*desc)</highlight></codeline>
<codeline lineno="156"><highlight class="normal">{</highlight></codeline>
<codeline lineno="157"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_SANITY_REGION_BEFORE_ALIGNED<sp/>&gt;<sp/>0</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>k;</highlight></codeline>
<codeline lineno="159"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>*m;</highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/>m<sp/>=<sp/>(<ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref>*)p<sp/>+<sp/><ref refid="memp__priv_8h_1a7f8c378e0581aa2dc491cff52ae4fce2" kindref="member">MEMP_SIZE</ref><sp/>-<sp/>MEMP_SANITY_REGION_BEFORE_ALIGNED;</highlight></codeline>
<codeline lineno="161"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(k<sp/>=<sp/>0;<sp/>k<sp/>&lt;<sp/>MEMP_SANITY_REGION_BEFORE_ALIGNED;<sp/>k++)<sp/>{</highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(m[k]<sp/>!=<sp/>0xcd)<sp/>{</highlight></codeline>
<codeline lineno="163"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>errstr[128]<sp/>=<sp/></highlight><highlight class="stringliteral">&quot;detected<sp/>memp<sp/>underflow<sp/>in<sp/>pool<sp/>&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="164"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>strcat(errstr,<sp/>desc-&gt;desc);</highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(errstr,<sp/>0);</highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="167"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="168"><highlight class="normal"></highlight><highlight class="preprocessor">#else<sp/></highlight><highlight class="comment">/*<sp/>MEMP_SANITY_REGION_BEFORE_ALIGNED<sp/>&gt;<sp/>0<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga70624a5deb8b9199406372a7f3603ecf" kindref="member">LWIP_UNUSED_ARG</ref>(p);</highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga70624a5deb8b9199406372a7f3603ecf" kindref="member">LWIP_UNUSED_ARG</ref>(desc);</highlight></codeline>
<codeline lineno="171"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>MEMP_SANITY_REGION_BEFORE_ALIGNED<sp/>&gt;<sp/>0<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="172"><highlight class="normal">}</highlight></codeline>
<codeline lineno="173"><highlight class="normal"></highlight></codeline>
<codeline lineno="177"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="178"><highlight class="normal">memp_overflow_init_element(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structmemp" kindref="compound">memp</ref><sp/>*p,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structmemp__desc" kindref="compound">memp_desc</ref><sp/>*desc)</highlight></codeline>
<codeline lineno="179"><highlight class="normal">{</highlight></codeline>
<codeline lineno="180"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_SANITY_REGION_BEFORE_ALIGNED<sp/>&gt;<sp/>0<sp/>||<sp/>MEMP_SANITY_REGION_AFTER_ALIGNED<sp/>&gt;<sp/>0</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="181"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>*m;</highlight></codeline>
<codeline lineno="182"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_SANITY_REGION_BEFORE_ALIGNED<sp/>&gt;<sp/>0</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="183"><highlight class="normal"><sp/><sp/>m<sp/>=<sp/>(<ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref>*)p<sp/>+<sp/><ref refid="memp__priv_8h_1a7f8c378e0581aa2dc491cff52ae4fce2" kindref="member">MEMP_SIZE</ref><sp/>-<sp/>MEMP_SANITY_REGION_BEFORE_ALIGNED;</highlight></codeline>
<codeline lineno="184"><highlight class="normal"><sp/><sp/><ref refid="string_8h_1ace4b911463887af5e748326323e99a23" kindref="member">memset</ref>(m,<sp/>0xcd,<sp/>MEMP_SANITY_REGION_BEFORE_ALIGNED);</highlight></codeline>
<codeline lineno="185"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="186"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_SANITY_REGION_AFTER_ALIGNED<sp/>&gt;<sp/>0</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="187"><highlight class="normal"><sp/><sp/>m<sp/>=<sp/>(<ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref>*)p<sp/>+<sp/><ref refid="memp__priv_8h_1a7f8c378e0581aa2dc491cff52ae4fce2" kindref="member">MEMP_SIZE</ref><sp/>+<sp/>desc-&gt;<ref refid="structmemp__desc_1a1688d2bdd5a7b77700e1fa627f025ba3" kindref="member">size</ref>;</highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/><ref refid="string_8h_1ace4b911463887af5e748326323e99a23" kindref="member">memset</ref>(m,<sp/>0xcd,<sp/>MEMP_SANITY_REGION_AFTER_ALIGNED);</highlight></codeline>
<codeline lineno="189"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="190"><highlight class="normal"></highlight><highlight class="preprocessor">#else<sp/></highlight><highlight class="comment">/*<sp/>MEMP_SANITY_REGION_BEFORE_ALIGNED<sp/>&gt;<sp/>0<sp/>||<sp/>MEMP_SANITY_REGION_AFTER_ALIGNED<sp/>&gt;<sp/>0<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="191"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga70624a5deb8b9199406372a7f3603ecf" kindref="member">LWIP_UNUSED_ARG</ref>(p);</highlight></codeline>
<codeline lineno="192"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga70624a5deb8b9199406372a7f3603ecf" kindref="member">LWIP_UNUSED_ARG</ref>(desc);</highlight></codeline>
<codeline lineno="193"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>MEMP_SANITY_REGION_BEFORE_ALIGNED<sp/>&gt;<sp/>0<sp/>||<sp/>MEMP_SANITY_REGION_AFTER_ALIGNED<sp/>&gt;<sp/>0<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="194"><highlight class="normal">}</highlight></codeline>
<codeline lineno="195"><highlight class="normal"></highlight></codeline>
<codeline lineno="196"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_OVERFLOW_CHECK<sp/>&gt;=<sp/>2</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="197"><highlight class="normal"></highlight></codeline>
<codeline lineno="202"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="203"><highlight class="normal">memp_overflow_check_all(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="204"><highlight class="normal">{</highlight></codeline>
<codeline lineno="205"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>i,<sp/>j;</highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structmemp" kindref="compound">memp</ref><sp/>*p;</highlight></codeline>
<codeline lineno="207"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1a945395fa326214fc9736487242710a90" kindref="member">SYS_ARCH_DECL_PROTECT</ref>(old_level);</highlight></codeline>
<codeline lineno="208"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1a3d0e48feafd378e9c26c64567ecd8bab" kindref="member">SYS_ARCH_PROTECT</ref>(old_level);</highlight></codeline>
<codeline lineno="209"><highlight class="normal"></highlight></codeline>
<codeline lineno="210"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/><ref refid="memp_8h_1a85a164b1f7764951cc685ea525114e57a3387042084427642949f3223c7ddd321" kindref="member">MEMP_MAX</ref>;<sp/>++i)<sp/>{</highlight></codeline>
<codeline lineno="211"><highlight class="normal"><sp/><sp/><sp/><sp/>p<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structmemp" kindref="compound">memp</ref>*)<ref refid="group__compiler__abstraction_1gaa8e8724eb1c220cbbb90de9e175ce1dc" kindref="member">LWIP_MEM_ALIGN</ref>(<ref refid="memp_8c_1ad78a1f656a766f2c6341aa466762b883" kindref="member">memp_pools</ref>[i]-&gt;base);</highlight></codeline>
<codeline lineno="212"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(j<sp/>=<sp/>0;<sp/>j<sp/>&lt;<sp/><ref refid="memp_8c_1ad78a1f656a766f2c6341aa466762b883" kindref="member">memp_pools</ref>[i]-&gt;<ref refid="structmemp__desc_1a2c32db78e565b8812ca0e20fe929a8a7" kindref="member">num</ref>;<sp/>++j)<sp/>{</highlight></codeline>
<codeline lineno="213"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>memp_overflow_check_element_overflow(p,<sp/><ref refid="memp_8c_1ad78a1f656a766f2c6341aa466762b883" kindref="member">memp_pools</ref>[i]);</highlight></codeline>
<codeline lineno="214"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>memp_overflow_check_element_underflow(p,<sp/><ref refid="memp_8c_1ad78a1f656a766f2c6341aa466762b883" kindref="member">memp_pools</ref>[i]);</highlight></codeline>
<codeline lineno="215"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>p<sp/>=<sp/><ref refid="group__compiler__abstraction_1gaade87973d72135b0b3afccfff4f62eb8" kindref="member">LWIP_ALIGNMENT_CAST</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structmemp" kindref="compound">memp</ref>*,<sp/>((<ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref>*)p<sp/>+<sp/><ref refid="memp__priv_8h_1a7f8c378e0581aa2dc491cff52ae4fce2" kindref="member">MEMP_SIZE</ref><sp/>+<sp/><ref refid="memp_8c_1ad78a1f656a766f2c6341aa466762b883" kindref="member">memp_pools</ref>[i]-&gt;size<sp/>+<sp/>MEMP_SANITY_REGION_AFTER_ALIGNED));</highlight></codeline>
<codeline lineno="216"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="217"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="218"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1a2f48e97047945642ddeb27e65bf4ffe2" kindref="member">SYS_ARCH_UNPROTECT</ref>(old_level);</highlight></codeline>
<codeline lineno="219"><highlight class="normal">}</highlight></codeline>
<codeline lineno="220"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>MEMP_OVERFLOW_CHECK<sp/>&gt;=<sp/>2<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="221"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>MEMP_OVERFLOW_CHECK<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="222"><highlight class="normal"></highlight></codeline>
<codeline lineno="229"><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="230" refid="memp_8c_1a6416303426d05526bed33f241fa6ecd7" refkind="member"><highlight class="normal"><ref refid="memp_8c_1a6416303426d05526bed33f241fa6ecd7" kindref="member">memp_init_pool</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structmemp__desc" kindref="compound">memp_desc</ref><sp/>*desc)</highlight></codeline>
<codeline lineno="231"><highlight class="normal">{</highlight></codeline>
<codeline lineno="232"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_MEM_MALLOC</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="233"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga70624a5deb8b9199406372a7f3603ecf" kindref="member">LWIP_UNUSED_ARG</ref>(desc);</highlight></codeline>
<codeline lineno="234"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="235"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="236"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structmemp" kindref="compound">memp</ref><sp/>*<ref refid="structmemp" kindref="compound">memp</ref>;</highlight></codeline>
<codeline lineno="237"><highlight class="normal"></highlight></codeline>
<codeline lineno="238"><highlight class="normal"><sp/><sp/>*desc-&gt;<ref refid="structmemp__desc_1a9d6b758ce5c3b47a67a7568d38fb3926" kindref="member">tab</ref><sp/>=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="239"><highlight class="normal"><sp/><sp/><ref refid="structmemp" kindref="compound">memp</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structmemp" kindref="compound">memp</ref>*)<ref refid="group__compiler__abstraction_1gaa8e8724eb1c220cbbb90de9e175ce1dc" kindref="member">LWIP_MEM_ALIGN</ref>(desc-&gt;<ref refid="structmemp__desc_1a9aec58adcbcd88167247296ca4346558" kindref="member">base</ref>);</highlight></codeline>
<codeline lineno="240"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>create<sp/>a<sp/>linked<sp/>list<sp/>of<sp/>memp<sp/>elements<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>desc-&gt;<ref refid="structmemp__desc_1a2c32db78e565b8812ca0e20fe929a8a7" kindref="member">num</ref>;<sp/>++i)<sp/>{</highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structmemp" kindref="compound">memp</ref>-&gt;<ref refid="structmemp_1a86abb86558e1cdee1bd2382f0323654d" kindref="member">next</ref><sp/>=<sp/>*desc-&gt;<ref refid="structmemp__desc_1a9d6b758ce5c3b47a67a7568d38fb3926" kindref="member">tab</ref>;</highlight></codeline>
<codeline lineno="243"><highlight class="normal"><sp/><sp/><sp/><sp/>*desc-&gt;<ref refid="structmemp__desc_1a9d6b758ce5c3b47a67a7568d38fb3926" kindref="member">tab</ref><sp/>=<sp/><ref refid="structmemp" kindref="compound">memp</ref>;</highlight></codeline>
<codeline lineno="244"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_OVERFLOW_CHECK</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="245"><highlight class="normal"><sp/><sp/><sp/><sp/>memp_overflow_init_element(<ref refid="structmemp" kindref="compound">memp</ref>,<sp/>desc);</highlight></codeline>
<codeline lineno="246"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>MEMP_OVERFLOW_CHECK<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="247"><highlight class="normal"><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>cast<sp/>through<sp/>void*<sp/>to<sp/>get<sp/>rid<sp/>of<sp/>alignment<sp/>warnings<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="248"><highlight class="normal"><sp/><sp/><sp/><ref refid="structmemp" kindref="compound">memp</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structmemp" kindref="compound">memp</ref><sp/>*)(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)((<ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>*)<ref refid="structmemp" kindref="compound">memp</ref><sp/>+<sp/><ref refid="memp__priv_8h_1a7f8c378e0581aa2dc491cff52ae4fce2" kindref="member">MEMP_SIZE</ref><sp/>+<sp/>desc-&gt;<ref refid="structmemp__desc_1a1688d2bdd5a7b77700e1fa627f025ba3" kindref="member">size</ref></highlight></codeline>
<codeline lineno="249"><highlight class="normal">#</highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/><ref refid="lwipopts_8h_1a27fdd01194a42fc41a7716b72cdb49e3" kindref="member">MEMP_OVERFLOW_CHECK</ref></highlight></codeline>
<codeline lineno="250"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>+<sp/>MEMP_SANITY_REGION_AFTER_ALIGNED</highlight></codeline>
<codeline lineno="251"><highlight class="normal">#endif</highlight></codeline>
<codeline lineno="252"><highlight class="normal"><sp/><sp/><sp/><sp/>);</highlight></codeline>
<codeline lineno="253"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="254"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_STATS</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="255"><highlight class="normal"><sp/><sp/>desc-&gt;stats-&gt;avail<sp/>=<sp/>desc-&gt;<ref refid="structmemp__desc_1a2c32db78e565b8812ca0e20fe929a8a7" kindref="member">num</ref>;</highlight></codeline>
<codeline lineno="256"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>MEMP_STATS<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="257"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>!MEMP_MEM_MALLOC<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="258"><highlight class="normal"></highlight></codeline>
<codeline lineno="259"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_STATS<sp/>&amp;&amp;<sp/>(defined(LWIP_DEBUG)<sp/>||<sp/>LWIP_STATS_DISPLAY)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="260"><highlight class="normal"><sp/><sp/>desc-&gt;stats-&gt;name<sp/><sp/>=<sp/>desc-&gt;desc;</highlight></codeline>
<codeline lineno="261"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>MEMP_STATS<sp/>&amp;&amp;<sp/>(defined(LWIP_DEBUG)<sp/>||<sp/>LWIP_STATS_DISPLAY)<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="262"><highlight class="normal">}</highlight></codeline>
<codeline lineno="263"><highlight class="normal"></highlight></codeline>
<codeline lineno="270"><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="271" refid="memp_8c_1a9693e5b1ac2c6b9c0e7870522d45efa2" refkind="member"><highlight class="normal"><ref refid="memp_8c_1a9693e5b1ac2c6b9c0e7870522d45efa2" kindref="member">memp_init</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="272"><highlight class="normal">{</highlight></codeline>
<codeline lineno="273"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>i;</highlight></codeline>
<codeline lineno="274"><highlight class="normal"></highlight></codeline>
<codeline lineno="275"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>for<sp/>every<sp/>pool:<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="276"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/><ref refid="def_8h_1a4abb61f4c9339d8a0a0c63b4fbfe6a37" kindref="member">LWIP_ARRAYSIZE</ref>(<ref refid="memp_8c_1ad78a1f656a766f2c6341aa466762b883" kindref="member">memp_pools</ref>);<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="277"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="memp_8c_1a6416303426d05526bed33f241fa6ecd7" kindref="member">memp_init_pool</ref>(<ref refid="memp_8c_1ad78a1f656a766f2c6341aa466762b883" kindref="member">memp_pools</ref>[i]);</highlight></codeline>
<codeline lineno="278"><highlight class="normal"></highlight></codeline>
<codeline lineno="279"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_STATS<sp/>&amp;&amp;<sp/>MEMP_STATS</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="280"><highlight class="normal"><sp/><sp/><sp/><sp/>lwip_stats.memp[i]<sp/>=<sp/><ref refid="memp_8c_1ad78a1f656a766f2c6341aa466762b883" kindref="member">memp_pools</ref>[i]-&gt;stats;</highlight></codeline>
<codeline lineno="281"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="282"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="283"><highlight class="normal"></highlight></codeline>
<codeline lineno="284"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_OVERFLOW_CHECK<sp/>&gt;=<sp/>2</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="285"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>check<sp/>everything<sp/>a<sp/>first<sp/>time<sp/>to<sp/>see<sp/>if<sp/>it<sp/>worked<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="286"><highlight class="normal"><sp/><sp/>memp_overflow_check_all();</highlight></codeline>
<codeline lineno="287"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>MEMP_OVERFLOW_CHECK<sp/>&gt;=<sp/>2<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="288"><highlight class="normal">}</highlight></codeline>
<codeline lineno="289"><highlight class="normal"></highlight></codeline>
<codeline lineno="290"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*</highlight></codeline>
<codeline lineno="291"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>!MEMP_OVERFLOW_CHECK</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="292"><highlight class="normal">do_memp_malloc_pool(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structmemp__desc" kindref="compound">memp_desc</ref><sp/>*desc)</highlight></codeline>
<codeline lineno="293"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="294"><highlight class="normal">do_memp_malloc_pool_fn(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structmemp__desc" kindref="compound">memp_desc</ref><sp/>*desc,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/><ref refid="structfile" kindref="compound">file</ref>,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>line)</highlight></codeline>
<codeline lineno="295"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="296"><highlight class="normal">{</highlight></codeline>
<codeline lineno="297"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structmemp" kindref="compound">memp</ref><sp/>*<ref refid="structmemp" kindref="compound">memp</ref>;</highlight></codeline>
<codeline lineno="298"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1a945395fa326214fc9736487242710a90" kindref="member">SYS_ARCH_DECL_PROTECT</ref>(old_level);</highlight></codeline>
<codeline lineno="299"><highlight class="normal"></highlight></codeline>
<codeline lineno="300"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_MEM_MALLOC</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="301"><highlight class="normal"><sp/><sp/><ref refid="structmemp" kindref="compound">memp</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structmemp" kindref="compound">memp</ref><sp/>*)<ref refid="mem_8h_1a932aa40d85b14cb7331625e012d12335" kindref="member">mem_malloc</ref>(<ref refid="memp__priv_8h_1a7f8c378e0581aa2dc491cff52ae4fce2" kindref="member">MEMP_SIZE</ref><sp/>+<sp/><ref refid="memp__std_8h_1a561ce9de860eb47d034ceeb7eff3b20c" kindref="member">MEMP_ALIGN_SIZE</ref>(desc-&gt;<ref refid="structmemp__desc_1a1688d2bdd5a7b77700e1fa627f025ba3" kindref="member">size</ref>));</highlight></codeline>
<codeline lineno="302"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1a3d0e48feafd378e9c26c64567ecd8bab" kindref="member">SYS_ARCH_PROTECT</ref>(old_level);</highlight></codeline>
<codeline lineno="303"><highlight class="normal"></highlight><highlight class="preprocessor">#else<sp/></highlight><highlight class="comment">/*<sp/>MEMP_MEM_MALLOC<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="304"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1a3d0e48feafd378e9c26c64567ecd8bab" kindref="member">SYS_ARCH_PROTECT</ref>(old_level);</highlight></codeline>
<codeline lineno="305"><highlight class="normal"></highlight></codeline>
<codeline lineno="306"><highlight class="normal"><sp/><sp/><ref refid="structmemp" kindref="compound">memp</ref><sp/>=<sp/>*desc-&gt;<ref refid="structmemp__desc_1a9d6b758ce5c3b47a67a7568d38fb3926" kindref="member">tab</ref>;</highlight></codeline>
<codeline lineno="307"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>MEMP_MEM_MALLOC<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="308"><highlight class="normal"></highlight></codeline>
<codeline lineno="309"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structmemp" kindref="compound">memp</ref><sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="310"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>!MEMP_MEM_MALLOC</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="311"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_OVERFLOW_CHECK<sp/>==<sp/>1</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="312"><highlight class="normal"><sp/><sp/><sp/><sp/>memp_overflow_check_element_overflow(<ref refid="structmemp" kindref="compound">memp</ref>,<sp/>desc);</highlight></codeline>
<codeline lineno="313"><highlight class="normal"><sp/><sp/><sp/><sp/>memp_overflow_check_element_underflow(<ref refid="structmemp" kindref="compound">memp</ref>,<sp/>desc);</highlight></codeline>
<codeline lineno="314"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>MEMP_OVERFLOW_CHECK<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="315"><highlight class="normal"></highlight></codeline>
<codeline lineno="316"><highlight class="normal"><sp/><sp/><sp/><sp/>*desc-&gt;<ref refid="structmemp__desc_1a9d6b758ce5c3b47a67a7568d38fb3926" kindref="member">tab</ref><sp/>=<sp/><ref refid="structmemp" kindref="compound">memp</ref>-&gt;<ref refid="structmemp_1a86abb86558e1cdee1bd2382f0323654d" kindref="member">next</ref>;</highlight></codeline>
<codeline lineno="317"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_OVERFLOW_CHECK</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="318"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structmemp" kindref="compound">memp</ref>-&gt;<ref refid="structmemp_1a86abb86558e1cdee1bd2382f0323654d" kindref="member">next</ref><sp/>=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="319"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>MEMP_OVERFLOW_CHECK<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="320"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>!MEMP_MEM_MALLOC<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="321"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_OVERFLOW_CHECK</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="322"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structmemp" kindref="compound">memp</ref>-&gt;file<sp/>=<sp/><ref refid="tcpdump_8c_1a03d2d7be521e9d357862075078d24f06" kindref="member">file</ref>;</highlight></codeline>
<codeline lineno="323"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structmemp" kindref="compound">memp</ref>-&gt;line<sp/>=<sp/>line;</highlight></codeline>
<codeline lineno="324"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_MEM_MALLOC</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="325"><highlight class="normal"><sp/><sp/><sp/><sp/>memp_overflow_init_element(<ref refid="structmemp" kindref="compound">memp</ref>,<sp/>desc);</highlight></codeline>
<codeline lineno="326"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>MEMP_MEM_MALLOC<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="327"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>MEMP_OVERFLOW_CHECK<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="328"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(</highlight><highlight class="stringliteral">&quot;memp_malloc:<sp/>memp<sp/>properly<sp/>aligned&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="329"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>((<ref refid="group__compiler__abstraction_1gaf019cbb71af10dcfda7758b21e655307" kindref="member">mem_ptr_t</ref>)<ref refid="structmemp" kindref="compound">memp</ref><sp/>%<sp/><ref refid="lwipopts_8h_1a97343214666ee6dcb18c0bd77b441ea7" kindref="member">MEM_ALIGNMENT</ref>)<sp/>==<sp/>0);</highlight></codeline>
<codeline lineno="330"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_STATS</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="331"><highlight class="normal"><sp/><sp/><sp/><sp/>desc-&gt;stats-&gt;used++;</highlight></codeline>
<codeline lineno="332"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(desc-&gt;stats-&gt;used<sp/>&gt;<sp/>desc-&gt;stats-&gt;max)<sp/>{</highlight></codeline>
<codeline lineno="333"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>desc-&gt;stats-&gt;max<sp/>=<sp/>desc-&gt;stats-&gt;used;</highlight></codeline>
<codeline lineno="334"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="335"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="336"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="sys_8h_1a2f48e97047945642ddeb27e65bf4ffe2" kindref="member">SYS_ARCH_UNPROTECT</ref>(old_level);</highlight></codeline>
<codeline lineno="337"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>cast<sp/>through<sp/>u8_t*<sp/>to<sp/>get<sp/>rid<sp/>of<sp/>alignment<sp/>warnings<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="338"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>((<ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref>*)<ref refid="structmemp" kindref="compound">memp</ref><sp/>+<sp/><ref refid="memp__priv_8h_1a7f8c378e0581aa2dc491cff52ae4fce2" kindref="member">MEMP_SIZE</ref>);</highlight></codeline>
<codeline lineno="339"><highlight class="normal"><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="340"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ad80231923f7a808d49eba5ec57d63616" kindref="member">MEMP_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga0269bdc51f1e8a5ecf9af72c6e1c996c" kindref="member">LWIP_DBG_LEVEL_SERIOUS</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;memp_malloc:<sp/>out<sp/>of<sp/>memory<sp/>in<sp/>pool<sp/>%s\n&quot;</highlight><highlight class="normal">,<sp/>desc-&gt;desc));</highlight></codeline>
<codeline lineno="341"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_STATS</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="342"><highlight class="normal"><sp/><sp/><sp/><sp/>desc-&gt;stats-&gt;err++;</highlight></codeline>
<codeline lineno="343"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="344"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="345"><highlight class="normal"></highlight></codeline>
<codeline lineno="346"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1a2f48e97047945642ddeb27e65bf4ffe2" kindref="member">SYS_ARCH_UNPROTECT</ref>(old_level);</highlight></codeline>
<codeline lineno="347"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="348"><highlight class="normal">}</highlight></codeline>
<codeline lineno="349"><highlight class="normal"></highlight></codeline>
<codeline lineno="357"><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*</highlight></codeline>
<codeline lineno="358"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>!MEMP_OVERFLOW_CHECK</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="359" refid="memp_8c_1a348c83ee972f1edf7296a1cdf1d75f22" refkind="member"><highlight class="normal"><ref refid="memp_8c_1a348c83ee972f1edf7296a1cdf1d75f22" kindref="member">memp_malloc_pool</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structmemp__desc" kindref="compound">memp_desc</ref><sp/>*desc)</highlight></codeline>
<codeline lineno="360"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="361"><highlight class="normal">memp_malloc_pool_fn(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structmemp__desc" kindref="compound">memp_desc</ref><sp/>*desc,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/><ref refid="structfile" kindref="compound">file</ref>,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>line)</highlight></codeline>
<codeline lineno="362"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="363"><highlight class="normal">{</highlight></codeline>
<codeline lineno="364"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(</highlight><highlight class="stringliteral">&quot;invalid<sp/>pool<sp/>desc&quot;</highlight><highlight class="normal">,<sp/>desc<sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline>
<codeline lineno="365"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(desc<sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="366"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="367"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="368"><highlight class="normal"></highlight></codeline>
<codeline lineno="369"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>!MEMP_OVERFLOW_CHECK</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="370"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>do_memp_malloc_pool(desc);</highlight></codeline>
<codeline lineno="371"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="372"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>do_memp_malloc_pool_fn(desc,<sp/><ref refid="structfile" kindref="compound">file</ref>,<sp/>line);</highlight></codeline>
<codeline lineno="373"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="374"><highlight class="normal">}</highlight></codeline>
<codeline lineno="375"><highlight class="normal"></highlight></codeline>
<codeline lineno="383"><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*</highlight></codeline>
<codeline lineno="384"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>!MEMP_OVERFLOW_CHECK</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="385" refid="memp_8c_1a2b00593d086313c267b54a976bf67aa5" refkind="member"><highlight class="normal"><ref refid="memp_8c_1a2b00593d086313c267b54a976bf67aa5" kindref="member">memp_malloc</ref>(<ref refid="memp_8h_1a85a164b1f7764951cc685ea525114e57" kindref="member">memp_t</ref><sp/>type)</highlight></codeline>
<codeline lineno="386"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="387"><highlight class="normal">memp_malloc_fn(<ref refid="memp_8h_1a85a164b1f7764951cc685ea525114e57" kindref="member">memp_t</ref><sp/>type,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/><ref refid="structfile" kindref="compound">file</ref>,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>line)</highlight></codeline>
<codeline lineno="388"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="389"><highlight class="normal">{</highlight></codeline>
<codeline lineno="390"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*<ref refid="structmemp" kindref="compound">memp</ref>;</highlight></codeline>
<codeline lineno="391"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a827bc03cd7889e7c007df39d33b33d18" kindref="member">LWIP_ERROR</ref>(</highlight><highlight class="stringliteral">&quot;memp_malloc:<sp/>type<sp/>&lt;<sp/>MEMP_MAX&quot;</highlight><highlight class="normal">,<sp/>(type<sp/>&lt;<sp/><ref refid="memp_8h_1a85a164b1f7764951cc685ea525114e57a3387042084427642949f3223c7ddd321" kindref="member">MEMP_MAX</ref>),<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;);</highlight></codeline>
<codeline lineno="392"><highlight class="normal"></highlight></codeline>
<codeline lineno="393"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_OVERFLOW_CHECK<sp/>&gt;=<sp/>2</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="394"><highlight class="normal"><sp/><sp/>memp_overflow_check_all();</highlight></codeline>
<codeline lineno="395"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>MEMP_OVERFLOW_CHECK<sp/>&gt;=<sp/>2<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="396"><highlight class="normal"></highlight></codeline>
<codeline lineno="397"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>!MEMP_OVERFLOW_CHECK</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="398"><highlight class="normal"><sp/><sp/><ref refid="structmemp" kindref="compound">memp</ref><sp/>=<sp/>do_memp_malloc_pool(<ref refid="memp_8c_1ad78a1f656a766f2c6341aa466762b883" kindref="member">memp_pools</ref>[type]);</highlight></codeline>
<codeline lineno="399"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="400"><highlight class="normal"><sp/><sp/><ref refid="structmemp" kindref="compound">memp</ref><sp/>=<sp/>do_memp_malloc_pool_fn(<ref refid="memp_8c_1ad78a1f656a766f2c6341aa466762b883" kindref="member">memp_pools</ref>[type],<sp/><ref refid="structfile" kindref="compound">file</ref>,<sp/>line);</highlight></codeline>
<codeline lineno="401"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="402"><highlight class="normal"></highlight></codeline>
<codeline lineno="403"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="structmemp" kindref="compound">memp</ref>;</highlight></codeline>
<codeline lineno="404"><highlight class="normal">}</highlight></codeline>
<codeline lineno="405"><highlight class="normal"></highlight></codeline>
<codeline lineno="406"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="407"><highlight class="normal">do_memp_free_pool(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structmemp__desc" kindref="compound">memp_desc</ref>*<sp/>desc,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*<ref refid="structmem" kindref="compound">mem</ref>)</highlight></codeline>
<codeline lineno="408"><highlight class="normal">{</highlight></codeline>
<codeline lineno="409"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structmemp" kindref="compound">memp</ref><sp/>*<ref refid="structmemp" kindref="compound">memp</ref>;</highlight></codeline>
<codeline lineno="410"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1a945395fa326214fc9736487242710a90" kindref="member">SYS_ARCH_DECL_PROTECT</ref>(old_level);</highlight></codeline>
<codeline lineno="411"><highlight class="normal"></highlight></codeline>
<codeline lineno="412"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(</highlight><highlight class="stringliteral">&quot;memp_free:<sp/>mem<sp/>properly<sp/>aligned&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="413"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>((<ref refid="group__compiler__abstraction_1gaf019cbb71af10dcfda7758b21e655307" kindref="member">mem_ptr_t</ref>)<ref refid="structmem" kindref="compound">mem</ref><sp/>%<sp/><ref refid="lwipopts_8h_1a97343214666ee6dcb18c0bd77b441ea7" kindref="member">MEM_ALIGNMENT</ref>)<sp/>==<sp/>0);</highlight></codeline>
<codeline lineno="414"><highlight class="normal"></highlight></codeline>
<codeline lineno="415"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>cast<sp/>through<sp/>void*<sp/>to<sp/>get<sp/>rid<sp/>of<sp/>alignment<sp/>warnings<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="416"><highlight class="normal"><sp/><sp/><ref refid="structmemp" kindref="compound">memp</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structmemp" kindref="compound">memp</ref><sp/>*)(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)((<ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref>*)<ref refid="structmem" kindref="compound">mem</ref><sp/>-<sp/><ref refid="memp__priv_8h_1a7f8c378e0581aa2dc491cff52ae4fce2" kindref="member">MEMP_SIZE</ref>);</highlight></codeline>
<codeline lineno="417"><highlight class="normal"></highlight></codeline>
<codeline lineno="418"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1a3d0e48feafd378e9c26c64567ecd8bab" kindref="member">SYS_ARCH_PROTECT</ref>(old_level);</highlight></codeline>
<codeline lineno="419"><highlight class="normal"></highlight></codeline>
<codeline lineno="420"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_OVERFLOW_CHECK<sp/>==<sp/>1</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="421"><highlight class="normal"><sp/><sp/>memp_overflow_check_element_overflow(<ref refid="structmemp" kindref="compound">memp</ref>,<sp/>desc);</highlight></codeline>
<codeline lineno="422"><highlight class="normal"><sp/><sp/>memp_overflow_check_element_underflow(<ref refid="structmemp" kindref="compound">memp</ref>,<sp/>desc);</highlight></codeline>
<codeline lineno="423"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>MEMP_OVERFLOW_CHECK<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="424"><highlight class="normal"></highlight></codeline>
<codeline lineno="425"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_STATS</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="426"><highlight class="normal"><sp/><sp/>desc-&gt;stats-&gt;used--;</highlight></codeline>
<codeline lineno="427"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="428"><highlight class="normal"></highlight></codeline>
<codeline lineno="429"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_MEM_MALLOC</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="430"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga70624a5deb8b9199406372a7f3603ecf" kindref="member">LWIP_UNUSED_ARG</ref>(desc);</highlight></codeline>
<codeline lineno="431"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1a2f48e97047945642ddeb27e65bf4ffe2" kindref="member">SYS_ARCH_UNPROTECT</ref>(old_level);</highlight></codeline>
<codeline lineno="432"><highlight class="normal"><sp/><sp/><ref refid="mem_8h_1a2fd7aa1adf6e394d3be7c7734e7df41a" kindref="member">mem_free</ref>(<ref refid="structmemp" kindref="compound">memp</ref>);</highlight></codeline>
<codeline lineno="433"><highlight class="normal"></highlight><highlight class="preprocessor">#else<sp/></highlight><highlight class="comment">/*<sp/>MEMP_MEM_MALLOC<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="434"><highlight class="normal"><sp/><sp/><ref refid="structmemp" kindref="compound">memp</ref>-&gt;<ref refid="structmemp_1a86abb86558e1cdee1bd2382f0323654d" kindref="member">next</ref><sp/>=<sp/>*desc-&gt;<ref refid="structmemp__desc_1a9d6b758ce5c3b47a67a7568d38fb3926" kindref="member">tab</ref>;</highlight></codeline>
<codeline lineno="435"><highlight class="normal"><sp/><sp/>*desc-&gt;<ref refid="structmemp__desc_1a9d6b758ce5c3b47a67a7568d38fb3926" kindref="member">tab</ref><sp/>=<sp/><ref refid="structmemp" kindref="compound">memp</ref>;</highlight></codeline>
<codeline lineno="436"><highlight class="normal"></highlight></codeline>
<codeline lineno="437"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_SANITY_CHECK</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="438"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(</highlight><highlight class="stringliteral">&quot;memp<sp/>sanity&quot;</highlight><highlight class="normal">,<sp/>memp_sanity(desc));</highlight></codeline>
<codeline lineno="439"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>MEMP_SANITY_CHECK<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="440"><highlight class="normal"></highlight></codeline>
<codeline lineno="441"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1a2f48e97047945642ddeb27e65bf4ffe2" kindref="member">SYS_ARCH_UNPROTECT</ref>(old_level);</highlight></codeline>
<codeline lineno="442"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>!MEMP_MEM_MALLOC<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="443"><highlight class="normal">}</highlight></codeline>
<codeline lineno="444"><highlight class="normal"></highlight></codeline>
<codeline lineno="451"><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="452" refid="memp_8c_1a62f8c3c907743e34eee3cdac7fa1eaa5" refkind="member"><highlight class="normal"><ref refid="memp_8c_1a62f8c3c907743e34eee3cdac7fa1eaa5" kindref="member">memp_free_pool</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structmemp__desc" kindref="compound">memp_desc</ref>*<sp/>desc,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*<ref refid="structmem" kindref="compound">mem</ref>)</highlight></codeline>
<codeline lineno="453"><highlight class="normal">{</highlight></codeline>
<codeline lineno="454"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(</highlight><highlight class="stringliteral">&quot;invalid<sp/>pool<sp/>desc&quot;</highlight><highlight class="normal">,<sp/>desc<sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline>
<codeline lineno="455"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((desc<sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>||<sp/>(<ref refid="structmem" kindref="compound">mem</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>))<sp/>{</highlight></codeline>
<codeline lineno="456"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="457"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="458"><highlight class="normal"></highlight></codeline>
<codeline lineno="459"><highlight class="normal"><sp/><sp/>do_memp_free_pool(desc,<sp/><ref refid="structmem" kindref="compound">mem</ref>);</highlight></codeline>
<codeline lineno="460"><highlight class="normal">}</highlight></codeline>
<codeline lineno="461"><highlight class="normal"></highlight></codeline>
<codeline lineno="468"><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="469" refid="memp_8c_1aecd94926b7c2a0e23ae195f4ae97581f" refkind="member"><highlight class="normal"><ref refid="memp_8c_1aecd94926b7c2a0e23ae195f4ae97581f" kindref="member">memp_free</ref>(<ref refid="memp_8h_1a85a164b1f7764951cc685ea525114e57" kindref="member">memp_t</ref><sp/>type,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*<ref refid="structmem" kindref="compound">mem</ref>)</highlight></codeline>
<codeline lineno="470"><highlight class="normal">{</highlight></codeline>
<codeline lineno="471"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>LWIP_HOOK_MEMP_AVAILABLE</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="472"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structmemp" kindref="compound">memp</ref><sp/>*old_first;</highlight></codeline>
<codeline lineno="473"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="474"><highlight class="normal"></highlight></codeline>
<codeline lineno="475"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a827bc03cd7889e7c007df39d33b33d18" kindref="member">LWIP_ERROR</ref>(</highlight><highlight class="stringliteral">&quot;memp_free:<sp/>type<sp/>&lt;<sp/>MEMP_MAX&quot;</highlight><highlight class="normal">,<sp/>(type<sp/>&lt;<sp/><ref refid="memp_8h_1a85a164b1f7764951cc685ea525114e57a3387042084427642949f3223c7ddd321" kindref="member">MEMP_MAX</ref>),<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;);</highlight></codeline>
<codeline lineno="476"><highlight class="normal"></highlight></codeline>
<codeline lineno="477"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structmem" kindref="compound">mem</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="478"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="479"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="480"><highlight class="normal"></highlight></codeline>
<codeline lineno="481"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>MEMP_OVERFLOW_CHECK<sp/>&gt;=<sp/>2</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="482"><highlight class="normal"><sp/><sp/>memp_overflow_check_all();</highlight></codeline>
<codeline lineno="483"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>MEMP_OVERFLOW_CHECK<sp/>&gt;=<sp/>2<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="484"><highlight class="normal"></highlight></codeline>
<codeline lineno="485"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>LWIP_HOOK_MEMP_AVAILABLE</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="486"><highlight class="normal"><sp/><sp/>old_first<sp/>=<sp/>*<ref refid="memp_8c_1ad78a1f656a766f2c6341aa466762b883" kindref="member">memp_pools</ref>[type]-&gt;<ref refid="structmemp__desc_1a9d6b758ce5c3b47a67a7568d38fb3926" kindref="member">tab</ref>;</highlight></codeline>
<codeline lineno="487"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="488"><highlight class="normal"></highlight></codeline>
<codeline lineno="489"><highlight class="normal"><sp/><sp/>do_memp_free_pool(<ref refid="memp_8c_1ad78a1f656a766f2c6341aa466762b883" kindref="member">memp_pools</ref>[type],<sp/><ref refid="structmem" kindref="compound">mem</ref>);</highlight></codeline>
<codeline lineno="490"><highlight class="normal"></highlight></codeline>
<codeline lineno="491"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>LWIP_HOOK_MEMP_AVAILABLE</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="492"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(old_first<sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="493"><highlight class="normal"><sp/><sp/><sp/><sp/>LWIP_HOOK_MEMP_AVAILABLE(type);</highlight></codeline>
<codeline lineno="494"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="495"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="496"><highlight class="normal">}</highlight></codeline>
    </programlisting>
    <location file="C:/Dev/git/UbixOS/sys/net/core/memp.c"/>
  </compounddef>
</doxygen>
