NetServices Stack source
Dependents: HelloWorld ServoInterfaceBoardExample1 4180_Lab4
Diff: lwip/core/mem.c
- Revision:
- 5:dd63a1e02b1b
- Parent:
- 0:632c9925f013
diff -r fd826cad83c0 -r dd63a1e02b1b lwip/core/mem.c --- a/lwip/core/mem.c Fri Jul 09 14:46:47 2010 +0000 +++ b/lwip/core/mem.c Tue Jul 27 15:59:42 2010 +0000 @@ -82,7 +82,7 @@ memp_t poolnr; mem_size_t required_size = size + sizeof(struct memp_malloc_helper); - for (poolnr = MEMP_POOL_FIRST; poolnr <= MEMP_POOL_LAST; poolnr++) { + for (poolnr = MEMP_POOL_FIRST; poolnr <= MEMP_POOL_LAST; poolnr = (memp_t)(poolnr + 1)) { #if MEM_USE_POOLS_TRY_BIGGER_POOL again: #endif /* MEM_USE_POOLS_TRY_BIGGER_POOL */ @@ -178,7 +178,7 @@ * how that space is calculated). */ #ifndef LWIP_RAM_HEAP_POINTER /** the heap. we need one struct mem at the end and some room for alignment */ -u8_t ram_heap[MEM_SIZE_ALIGNED + (2*SIZEOF_STRUCT_MEM) + MEM_ALIGNMENT] MEM_POSITION; +u8_t ram_heap[MEM_SIZE_ALIGNED + (2*SIZEOF_STRUCT_MEM) + MEM_ALIGNMENT]; #define LWIP_RAM_HEAP_POINTER ram_heap #endif /* LWIP_RAM_HEAP_POINTER */ @@ -189,10 +189,8 @@ /** pointer to the lowest free block, this is used for faster search */ static struct mem *lfree; -#if (NO_SYS==0) //Pointless if monothreaded app /** concurrent access protection */ static sys_mutex_t mem_mutex; -#endif #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT