mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-07 15:04:39 +08:00
Added short comment in file description about how to handle MEM_USE_POOLS / MEM_LIBC_MALLOC
This commit is contained in:
parent
f3f7bd00e5
commit
22f51f953b
@ -2,6 +2,22 @@
|
|||||||
* @file
|
* @file
|
||||||
* Dynamic memory manager
|
* Dynamic memory manager
|
||||||
*
|
*
|
||||||
|
* This is a lightweight replacement for the standard C library malloc().
|
||||||
|
*
|
||||||
|
* If you want to use the standard C library malloc() instead, define
|
||||||
|
* MEM_LIBC_MALLOC to 1 in your lwipopts.h
|
||||||
|
*
|
||||||
|
* To let mem_malloc() use pools (prevents fragmentation and is much faster than
|
||||||
|
* a heap but might waste some memory), define MEM_USE_POOLS to 1, define
|
||||||
|
* MEM_USE_CUSTOM_POOLS to 1 and create a file "lwippools.h" that includes a list
|
||||||
|
* of pools like the this (more pools can be added between _START and _END):
|
||||||
|
*
|
||||||
|
* /* Define three pools with sizes 256, 512, and 1512 bytes
|
||||||
|
* LWIP_MALLOC_MEMPOOL_START
|
||||||
|
* LWIP_MALLOC_MEMPOOL(20, 256)
|
||||||
|
* LWIP_MALLOC_MEMPOOL(10, 512)
|
||||||
|
* LWIP_MALLOC_MEMPOOL(5, 1512)
|
||||||
|
* LWIP_MALLOC_MEMPOOL_END
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user