INET Framework for OMNeT++/OMNEST
memp.cc File Reference

Dynamic pool memory manager. More...

#include "lwip/opt.h"
#include "lwip/memp.h"
#include "lwip/pbuf.h"
#include "lwip/lwip_udp.h"
#include "lwip/raw.h"
#include "lwip/lwip_tcp.h"
#include "lwip/lwip_igmp.h"
#include "lwip/api.h"
#include "lwip/api_msg.h"
#include "lwip/tcpip.h"
#include "lwip/sys.h"
#include "lwip/stats.h"
#include "netif/etharp.h"
#include "lwip/ip_frag.h"
#include <string.h>
#include "lwip/memp_std.h"

Classes

struct  inet::tcp::memp
 

Namespaces

 inet
 Copyright (c) 2005 Jan Ringo�, www.ringos.cz.
 
 inet::tcp
 

Macros

#define MEMP_SIZE   0
 
#define MEMP_ALIGN_SIZE(x)   (LWIP_MEM_ALIGN_SIZE(x))
 
#define LWIP_MEMPOOL(name, num, size, desc)   LWIP_MEM_ALIGN_SIZE(size),
 
#define LWIP_MEMPOOL(name, num, size, desc)   (num),
 
#define LWIP_MEMPOOL(name, num, size, desc)   + ( (num) * (MEMP_SIZE + MEMP_ALIGN_SIZE(size) ) )
 

Functions

void inet::tcp::memp_init (void)
 Initialize this module. More...
 
void * inet::tcp::memp_malloc (memp_t type)
 Get an element from a specific pool. More...
 
void inet::tcp::memp_free (memp_t type, void *mem)
 Put an element back into its pool. More...
 

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.

Macro Definition Documentation

#define LWIP_MEMPOOL (   name,
  num,
  size,
  desc 
)    LWIP_MEM_ALIGN_SIZE(size),
#define LWIP_MEMPOOL (   name,
  num,
  size,
  desc 
)    (num),
#define LWIP_MEMPOOL (   name,
  num,
  size,
  desc 
)    + ( (num) * (MEMP_SIZE + MEMP_ALIGN_SIZE(size) ) )
#define MEMP_ALIGN_SIZE (   x)    (LWIP_MEM_ALIGN_SIZE(x))
#define MEMP_SIZE   0