memp.c File Reference

#include "lwip/opt.h"
#include "lwip/memp.h"
#include "lwip/pbuf.h"
#include "lwip/udp.h"
#include "lwip/raw.h"
#include "lwip/tcp_impl.h"
#include "lwip/igmp.h"
#include "lwip/api.h"
#include "lwip/api_msg.h"
#include "lwip/tcpip.h"
#include "lwip/sys.h"
#include "lwip/timers.h"
#include "lwip/stats.h"
#include "netif/etharp.h"
#include "lwip/ip_frag.h"
#include "lwip/snmp_structs.h"
#include "lwip/snmp_msg.h"
#include "lwip/dns.h"
#include "netif/ppp_oe.h"
#include <string.h>
#include "lwip/memp_std.h"

Functions

void memp_init (void)
void * memp_malloc (memp_t type)
void memp_free (memp_t type, void *mem)

Detailed Description

Dynamic pool memory manager

lwIP has dedicated pools for many structures (netconn, protocol control blocks, packet buffers, ...). All these pools are managed here.


Function Documentation

void memp_free memp_t  type,
void *  mem
 

Put an element back into its pool.

Parameters:
type the pool where to put mem
mem the memp element to free

void memp_init void   ) 
 

Initialize this module.

Carves out memp_memory into linked lists for each pool-type.

void* memp_malloc memp_t  type  ) 
 

Get an element from a specific pool.

Parameters:
type the pool to get an element from
the debug version has two more parameters:
Parameters:
file file name calling this function
line number of line where this function is called
Returns:
a pointer to the allocated memory or a NULL pointer on error


Generated on Fri Feb 14 12:33:21 2014 for 2014.1_doc by  doxygen 1.4.5