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: settings.c confuses me

Re: settings.c confuses me

From: TP Diffenbach <rockbox_at_diffenbach.org>
Date: Mon, 24 Mar 2003 09:04:17 -0500

How much code space do we use setting this up? It seems we have a /lot/ of repetitive code.

> The memory we
> waste using a bigger struct is saved by enabling simpler code to
> access the data.

Quoting Björn Stenberg <bjorn_at_haxx.se>:

> TP Diffenbach wrote:
> > Why not just read the settings on disk into global settings:
> > read( fd, &global_settings, sizeof( global_settings)?, with some
> additional
> > code for the RTC?
>
> The config block is packed into 512 bytes, while the
> global_settings struct is unpacked and thus bigger. The memory we
> waste using a bigger struct is saved by enabling simpler code to
> access the data. (Booleans as ints instead of bits, for example.)
>
> --
> Björn
>


-- 
Archos FM needs a Rockbox!
Received on 2003-03-24

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