Documentation

Documentation

Includes

lwip/opt.h

#include "lwip/opt.h"
#include "lwip/opt.h"

lwip/mem.h

#include "lwip/mem.h"
#include "lwip/mem.h"

lwip/priv/mem_priv.h

#include "lwip/priv/mem_priv.h"
#include "lwip/priv/mem_priv.h"

Macros

Marco LWIP_HDR_MEMP_PRIV_H

#define LWIP_HDR_MEMP_PRIV_H


      

Marco MEMP_SIZE

#define MEMP_SIZE         (LWIP_MEM_ALIGN_SIZE(sizeof(struct memp)) + MEM_SANITY_REGION_BEFORE_ALIGNED)
/* MEMP_SIZE: save space for struct memp and for sanity check */

Marco MEMP_ALIGN_SIZE(x)

#define MEMP_ALIGN_SIZE(x) (LWIP_MEM_ALIGN_SIZE(x) + MEM_SANITY_REGION_AFTER_ALIGNED)


      

Marco MEMP_SIZE

#define MEMP_SIZE          0
/* No sanity checks
 * We don't need to preserve the struct memp while not allocated, so we
 * can save a little space and set MEMP_SIZE to 0.
 */

Marco MEMP_ALIGN_SIZE(x)

#define MEMP_ALIGN_SIZE(x) (LWIP_MEM_ALIGN_SIZE(x))


      

Marco MEMP_POOL_FIRST

#define MEMP_POOL_FIRST ((memp_t) MEMP_POOL_HELPER_FIRST)
/* The actual start and stop values are here (cast them over)
   We use this helper type and these defines so we can avoid using const memp_t values */

Marco MEMP_POOL_LAST

#define MEMP_POOL_LAST  ((memp_t) MEMP_POOL_HELPER_LAST)


      

Marco DECLARE_LWIP_MEMPOOL_DESC(desc)

#define DECLARE_LWIP_MEMPOOL_DESC(desc) (desc),


      

Marco DECLARE_LWIP_MEMPOOL_DESC

#define DECLARE_LWIP_MEMPOOL_DESC(desc)


      

Marco LWIP_MEMPOOL_DECLARE_STATS_INSTANCE(name)

#define LWIP_MEMPOOL_DECLARE_STATS_INSTANCE(name) static struct stats_mem name;


      

Marco LWIP_MEMPOOL_DECLARE_STATS_REFERENCE(name)

#define LWIP_MEMPOOL_DECLARE_STATS_REFERENCE(name) &name,


      

Marco LWIP_MEMPOOL_DECLARE_STATS_INSTANCE

#define LWIP_MEMPOOL_DECLARE_STATS_INSTANCE(name)


      

Marco LWIP_MEMPOOL_DECLARE_STATS_REFERENCE

#define LWIP_MEMPOOL_DECLARE_STATS_REFERENCE(name)


      

Marco memp_malloc_pool(d)

#define memp_malloc_pool(d) memp_malloc_pool_fn((d), __FILE__, __LINE__)

      

Functions

Func memp_init_pool

void memp_init_pool(const struct memp_desc *desc);


      

Func memp_malloc_pool_fn

void *memp_malloc_pool_fn(const struct memp_desc* desc, const char* file, const int line);


      

Func memp_malloc_pool

void *memp_malloc_pool(const struct memp_desc *desc);


      

Func memp_free_pool

void memp_free_pool(const struct memp_desc* desc, void *mem);

      

Vars

Consts

Types

Typedefs

Typedef memp_pool_helper_t;

typedef enum {
   /* Get the first (via:
       MEMP_POOL_HELPER_START = ((u8_t) 1*MEMP_POOL_A + 0*MEMP_POOL_B + 0*MEMP_POOL_C + 0)*/
   MEMP_POOL_HELPER_FIRST = ((u8_t)
#define LWIP_MEMPOOL(name,num,size,desc)
#define LWIP_MALLOC_MEMPOOL_START 1
#define LWIP_MALLOC_MEMPOOL(num, size) * MEMP_POOL_##size + 0
#define LWIP_MALLOC_MEMPOOL_END
#include "lwip/priv/memp_std.h"
   ) ,
   /* Get the last (via:
       MEMP_POOL_HELPER_END = ((u8_t) 0 + MEMP_POOL_A*0 + MEMP_POOL_B*0 + MEMP_POOL_C*1) */
   MEMP_POOL_HELPER_LAST = ((u8_t)
#define LWIP_MEMPOOL(name,num,size,desc)
#define LWIP_MALLOC_MEMPOOL_START
#define LWIP_MALLOC_MEMPOOL(num, size) 0 + MEMP_POOL_##size *
#define LWIP_MALLOC_MEMPOOL_END 1
#include "lwip/priv/memp_std.h"
   )
} memp_pool_helper_t;
/* Use a helper type to get the start and end of the user "memory pools" for mem_malloc */