patchlwIP - A Lightweight TCP/IP stack - Patches: patch #7928, Fixed size calculation in MALLOC...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #7928: Fixed size calculation in MALLOC memory pool creation macro

Submitter:  Stathis Voukelatos <stathisv>
Submitted:  Fri 18 Jan 2013 08:43:10 AM UTC
   
 
Category:  pbufs Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  goldsimon Open/Closed:  Closed
Planned Release:  None

Sat 18 Jan 2014 09:42:18 PM UTC, comment #1: 

done, thanks for the patch.

Simon Goldschmidt <goldsimon>
Group administrator
Fri 18 Jan 2013 08:43:10 AM UTC, original submission:  

The LWIP_MALLOC_MEMPOOL macro needs to use the aligned size of the memp_malloc_helper structure, since mem_alloc() uses that to calculate the required pool element size. If LWIP_MEM_ALIGN_SIZE(x) is redefined to align to something larger than 4, then in some cases the current code can lead to unexpected mem_alloc() failures.
For example:
    #define LWIP_MEM_ALIGN_SIZE(size)  (((size) + 31) & ~31)
and the largest MALLOC pool is of size 60 bytes, e.g.:
    #define LWIP_MALLOC_MEMPOOL(256, 60)
then the following call:
    mem_malloc(58)
will cause an assertion.

Stathis Voukelatos <stathisv>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #27298:  0001-malloc-memory-pool.patch added by stathisv (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by stathisv (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-01-18 goldsimon StatusNone Done
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2013-01-18 stathisv Attached File- Added 0001-malloc-memory-pool.patch, #27298

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code