Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: RE: max 200 entries in a dir. why?

RE: max 200 entries in a dir. why?

From: John Wood <John.Wood_at_royalblue.com>
Date: Tue, 13 Aug 2002 17:34:14 -0400

Sorry to keep harping on about this...

>> That implies that we have dynamic memory allocation, something we work
very much to avoid. <<

Why exactly? Memory fragmentation? Performance? Surely you're not telling me
that malloc takes that long to execute?

It would have been better to implement directory caching the same way
playlists are implemented -- one buffer for the filenames (dynamically
sized), another for the sorted index array. That's the only reason we can
get 10,000 playlist items right?

If we had a playlist viewer then modifying that to work with directories too
wouldn't be that hard IMO.

(I know someone will say "show me the code" but it's worth discussing these
things before going off and spending/wasting days implementing it).

-----Original Message-----
From: Linus Nielsen Feltzing [mailto:linus_at_haxx.se]
Sent: Monday, August 12, 2002 3:30 PM
To: rockbox_at_cool.haxx.se
Subject: RE: max 200 entries in a dir. why?


On Mon, 12 Aug 2002 14:24:52 -0400, John Wood wrote:
> > > To do that, you need a temporary storing space for those, let's
> say, 500 names. And then we would have gained nothing, since we
> need to allocate space for that temporary storage. <<
>
> Yeah but it's temporary. You can free it once you're done sorting.
> It won't interfere with anything... it'll just come and go in the
> blink of an eye...

That implies that we have dynamic memory allocation, something we
work very much to avoid.

/Linus



*************************************************************************
This message is intended only for the stated addressee(s)
and may be confidential. Access to this email by anyone
else is unauthorised. Any opinions expressed in this email
do not necessarily reflect the opinions of royalblue.
Any unauthorised disclosure, use or dissemination,
either whole or in part is prohibited,. If you are not the
intended recipient of this message, please notify
the sender immediately.
*************************************************************************
Received on 2002-08-13

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy