lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] About how to use the mem pool in internal of lwip


From: yanhc519
Subject: [lwip-users] About how to use the mem pool in internal of lwip
Date: Thu, 2 Jul 2020 22:15:19 +0800

Hi all,

I am currently transiting my project from memory heap to memory pool.

I have defined MEM_USE_POOLS and MEMP_USE_CUSTOM_POOLS to 1. Add lwippools.h as follows:
LWIP_MALLOC_MEMPOOL_START
LWIP_MALLOC_MEMPOOL(20, 256)
LWIP_MALLOC_MEMPOOL_END

Therefore, the memp_t will be as follows
typedef enum {
  MEMP_RAW_PCB,
  MEMP_UDP_PCB,
  ...
  MEMP_MLD6_GROUP,
  MEMP_PBUF,
  MEMP_PBUF_POOL,
  MEMP_MAX
} memp_t;

When my project


reply via email to

[Prev in Thread] Current Thread [Next in Thread]