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: Björn Stenberg <bjorn_at_haxx.se>
Date: Mon, 24 Mar 2003 10:15:43 +0100

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
Received on 2003-03-24

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