[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #64118] Maybe there is a memory leak in mem.c
From: |
Shou |
Subject: |
[lwip-devel] [bug #64118] Maybe there is a memory leak in mem.c |
Date: |
Wed, 26 Apr 2023 21:38:11 -0400 (EDT) |
URL:
<https://savannah.nongnu.org/bugs/?64118>
Summary: Maybe there is a memory leak in mem.c
Group: lwIP - A Lightweight TCP/IP stack
Submitter: zcshou
Submitted: Thu 27 Apr 2023 01:38:09 AM UTC
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
lwIP version: 2.1.3
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Thu 27 Apr 2023 01:38:09 AM UTC By: Shou <zcshou>
In mem_init, the ram points to ram_heap with alignment (ram = (u8_t
*)LWIP_MEM_ALIGN(LWIP_RAM_HEAP_POINTER); ), but the ram_end points to
ram[MEM_SIZE_ALIGNED]. So the last SIZEOF_STRUCT_MEM will not used
LWIP_DECLARE_MEMORY_ALIGNED(ram_heap, MEM_SIZE_ALIGNED + (2U *
SIZEOF_STRUCT_MEM));
|--------------------------| <--- ram (ram_heap)
|--------------------------|
|--------------------------|
|--------------------------|
|----SIZEOF_STRUCT_MEM-----| <--- -MEM_SIZE_ALIGNED / ram_end
|----SIZEOF_STRUCT_MEM-----|
_______________________________________________________
Reply to this item at:
<https://savannah.nongnu.org/bugs/?64118>
_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-devel] [bug #64118] Maybe there is a memory leak in mem.c,
Shou <=