32 #ifndef __LWIP_MEM_H__ 33 #define __LWIP_MEM_H__ 55 #define mem_free vPortFree 58 #define mem_malloc pvPortMalloc 61 #define mem_calloc pvPortCalloc 64 #define mem_realloc pvPortRealloc 67 #define mem_zalloc pvPortZalloc 73 const char *file = mem_debug_file;\ 74 vPortFree(s, file, __LINE__);\ 78 #define mem_malloc(s) ({const char *file = mem_debug_file; pvPortMalloc(s, file, __LINE__);}) 81 #define mem_calloc(s) ({const char *file = mem_debug_file; pvPortCalloc(s, file, __LINE__);}) 84 #define mem_realloc(p, s) ({const char *file = mem_debug_file; pvPortRealloc(p, s, file, __LINE__);}) 87 #define mem_zalloc(s) ({const char *file = mem_debug_file; pvPortZalloc(s, file, __LINE__);}) 93 #define os_malloc(s) mem_malloc((s)) 96 #define os_realloc(p, s) mem_realloc((p), (s)) 99 #define os_zalloc(s) mem_zalloc((s)) 102 #define os_free(p) mem_free((p)) 108 #define mem_trim(mem, size) (mem) 115 #if MEM_SIZE > 64000l 117 #define MEM_SIZE_F U32_F 120 #define MEM_SIZE_F U16_F 128 #define mem_trim(mem, size) (mem) 143 #ifndef LWIP_MEM_ALIGN_SIZE 144 #define LWIP_MEM_ALIGN_SIZE(size) (((size) + MEM_ALIGNMENT - 1) & ~(MEM_ALIGNMENT-1)) 151 #ifndef LWIP_MEM_ALIGN_BUFFER 152 #define LWIP_MEM_ALIGN_BUFFER(size) (((size) + MEM_ALIGNMENT - 1)) 158 #ifndef LWIP_MEM_ALIGN 159 #define LWIP_MEM_ALIGN(addr) ((void *)(((mem_ptr_t)(addr) + MEM_ALIGNMENT - 1) & ~(mem_ptr_t)(MEM_ALIGNMENT-1)))
void * mem_calloc(mem_size_t count, mem_size_t size) ICACHE_FLASH_ATTR
#define ICACHE_FLASH_ATTR
void mem_init(void) ICACHE_FLASH_ATTR
void * mem_malloc(mem_size_t size) ICACHE_FLASH_ATTR
void * mem_trim(void *mem, mem_size_t size) ICACHE_FLASH_ATTR
void mem_free(void *mem) ICACHE_FLASH_ATTR