| /* -*- Mode: C++; tab-width: 4 indent-tabs-mode: nil -*- |
| * |
| * Copyright (c) 2013 Nest Labs, Inc. |
| * All rights reserved. |
| * |
| * This document is the property of Nest. It is considered |
| * confidential and proprietary information. |
| * |
| * This document may not be reproduced or transmitted in any form, |
| * in whole or in part, without the express written permission of |
| * Nest. |
| * |
| * Description: |
| * This file defines statically-allocated pools of memory that |
| * are used by LwIP in lieu of the Standard C Library heap. |
| * |
| * In lwipopts.h, define MEM_USE_POOLS to use the standard set |
| * of size-based pools and define MEMP_USE_CUSTOM_POOLS to use |
| * custom, named pools. |
| * |
| */ |
| |
| /* Define pools in increasing order according to the pool element |
| * size. |
| * |
| * LWIP_MALLOC_MEMPOOL(number_elements, element_size) |
| */ |
| |
| #if MEM_USE_POOLS |
| |
| #endif /* MEM_USE_POOLS */ |
| |
| /* Define pools in increasing order according to the pool element |
| * size. |
| * |
| * LWIP_MEMPOOL(name, number_elements, element_size, description) |
| */ |
| |
| #if MEMP_USE_CUSTOM_POOLS |
| |
| /* Custom PBUF pools must be defined starting with the pool containing the largest PBUF, |
| * and must be allocated in descending order by PBUF size. |
| * |
| * pbuf_alloc will start at the smallest pool (PBUF_VARIABLE_POOL_START in lwipopts.h) |
| * and try to allocate from pbuf pools of progressively larger pbuf size until it |
| * successfully finds a pbuf from one of the pools or until it passes PBUF_VARIABLE_POOL_END*/ |
| |
| #if LWIP_PBUF_FROM_CUSTOM_POOLS |
| LWIP_PBUF_MEMPOOL(PBUF_POOL_LARGE, PBUF_POOL_SIZE_LARGE, PBUF_POOL_BUFSIZE_LARGE, "PBUF_POOL_LARGE") |
| LWIP_PBUF_MEMPOOL(PBUF_POOL_MEDIUM, PBUF_POOL_SIZE_MEDIUM, PBUF_POOL_BUFSIZE_MEDIUM, "PBUF_POOL_MEDIUM") |
| LWIP_PBUF_MEMPOOL(PBUF_POOL_SMALL, PBUF_POOL_SIZE_SMALL, PBUF_POOL_BUFSIZE_SMALL, "PBUF_POOL_SMALL") |
| #endif |
| |
| /* Place other custom LWIP mem pools below this line */ |
| |
| #endif /* MEMP_USE_CUSTOM_POOLS */ |