[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Re: [lwip] mem_realloc bug?
From: |
Adam Dunkels |
Subject: |
[lwip-users] Re: [lwip] mem_realloc bug? |
Date: |
Wed, 08 Jan 2003 23:46:37 -0000 |
Hi!
On Mon, 2002-08-05 at 20:33, Earle Clubb wrote:
> I noticed that if mem_realloc() in mem.c is called in an attempt to increase
> the size of a given memory block, mem_realloc does nothing and returns no
> errors. Is this a bug or is it there by design?
It is there by design - it wasn't intended to be used to increase the
memory allocation.
> 1) Why doesn't mem_realloc have the capability to increase the size of a
> memory block?
>
> 2) Is there a reason why it should not be added?
The reason was quite simple; it wasn't needed for anything in the lwIP
stack.
> 3) I believe that an error should be returned if mem_realloc cannot
> accomodate the requested new size.
That probably would be a better way to handle it.
Actually, I have been thinking about the necessity of the mem_realloc()
function as it is very rarely used in lwIP. I suppose you are using it
for something in your code - what is your oppinion about it?
/adam
--
Adam Dunkels <address@hidden>
http://www.dunkels.com/adam/
[This message was sent through the lwip discussion list.]
- [lwip-users] Re: [lwip] mem_realloc bug?,
Adam Dunkels <=