From 5411e14c57185b2b33fbfbb7ff7fec8ca2700551 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Fri, 5 Nov 2010 19:12:23 +0000 Subject: Undo the part of r28480 that caused the simulator to also use host malloc. We want simulators to simulate target code where possible, that includes memory constraints and memory allocation schemes. It also removed the sim's ability to show the theme's ram usage. Use malloc only in application builds. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28498 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/skin_engine/skin_engine.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'apps/gui/skin_engine/skin_engine.c') diff --git a/apps/gui/skin_engine/skin_engine.c b/apps/gui/skin_engine/skin_engine.c index 960bbdb313..25baeb2c3c 100644 --- a/apps/gui/skin_engine/skin_engine.c +++ b/apps/gui/skin_engine/skin_engine.c @@ -40,18 +40,18 @@ static bool skins_initialising = true; -/* Hosted platforms use the host malloc to manage the buffer */ -#if ((CONFIG_PLATFORM&PLATFORM_HOSTED) == 0) -static char *skin_buffer = NULL; +/* App uses the host malloc to manage the buffer */ +#ifdef APPLICATION +#define skin_buffer NULL void theme_init_buffer(void) { - skin_buffer = buffer_alloc(SKIN_BUFFER_SIZE); skins_initialising = false; } -#else -#define skin_buffer NULL +#else +static char *skin_buffer = NULL; void theme_init_buffer(void) { + skin_buffer = buffer_alloc(SKIN_BUFFER_SIZE); skins_initialising = false; } #endif -- cgit v1.2.3