[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [patch #10088] allow "typedef u32_t mem_size_t" when MEM_SI
From: |
ODH |
Subject: |
[lwip-devel] [patch #10088] allow "typedef u32_t mem_size_t" when MEM_SIZE > 640000L and MEM_USE_POOLS |
Date: |
Fri, 13 Oct 2023 08:43:52 -0400 (EDT) |
Follow-up Comment #3, patch #10088 (project lwip):
When, for example, you have: MEM_SIZE == 132kB, you then have statements in
mem_init(...) like: "mem->next = MEM_SIZE_ALIGNED;" which is assigning the
value 0x00010000U to a 16-bit variable of type mem_size_t. This is obviously
wrong, and obviously not what the author of the software is expecting to
happen - they were expecting to be able to always fit the value of MEM_SIZE
into a variable of type mem_size_t. This patch corrects this situation for
cases in which MEM_SIZE_ALIGNED is, or is likely to be unable to fit within a
16-bit mem_size_t by using 32-bits for mem_size_t.
_______________________________________________________
Reply to this item at:
<https://savannah.nongnu.org/patch/?10088>
_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/