Rockbox mail archiveSubject: Re: another 8MB upgrade success story
Re: another 8MB upgrade success story
From: Gerald Clark <gerald_clark_at_mindspring.com>
Date: Thu, 20 Mar 2003 18:59:59 -0600
From: "Daniel Stenberg"<daniel_at_haxx.se>
Sent: 3/20/03 7:28:53 AM
To: "Gerald Clark"<gerald_clark_at_mindspring.com>
Subject: Re: another 8MB upgrade success story
On Thu, 20 Mar 2003, Gerald Clark wrote:
> Dynamic allocation should be fairly simple if only malloc is implemented
> with no release. Use a static table of *char,int values for buffer pointers
> and sizes. Allocate all buffers first, then enter the main routine.
And the benefit of doing like this would be... ?
The ability to allocate different sized blocks of memory based on total size or config values.
You have to allocate your buffers now, don't you?
The statement was made that dynamic allocation was too complicated .
That is only true if you also implement release and reuse of memory.
If you only allow for dynamically sized allocation from the total memory pool, without realloc() or free() type functions, then it does not have to be difficult at all.
Received on 2003-03-21
Page was last modified "Sat May 23 08:12:40 2020" The Rockbox Crew