[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] mem_malloc bug
From: |
Tom Hennen |
Subject: |
Re: [lwip-users] mem_malloc bug |
Date: |
Wed, 4 Oct 2006 18:25:21 -0400 |
"that you can't use the last little bit of your memory..."
That's how I ran across it in fact. I wasn't able to use the entire
TCP_SNDBUF as I was running out of memory before TCP_SNDBUF was full.
"Does it matter if a new one is made rather than updating the one in place?"
The existing one should be updated. Otherwise 'mem2->next =
mem->next' will cause mem2 to point to itself and 'mem2->used = 0'
will cause this block (which *is* used) to appear unused, causing an
error when it is freed (if not sooner).
I'm not sure if I'll be able to submit a patch (i.e. if my employer
will let me).