forked from len0rd/rockbox
Patch #3022 by Mikael Magnusson: Only zero out the actual bss area instead of the whole plugiin buffer, for faster plugin loading. * Applied the same idea to the overlay loader.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9535 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
930785cd8f
commit
b509ff5069
2 changed files with 7 additions and 3 deletions
|
@ -85,7 +85,6 @@ enum plugin_status run_overlay(struct plugin_api* rb, void* parameter,
|
|||
rb->splash(2*HZ, true, "%s overlay doesn't fit into memory.", name);
|
||||
return PLUGIN_ERROR;
|
||||
}
|
||||
rb->memset(header.load_addr, 0, header.end_addr - header.load_addr);
|
||||
|
||||
fd = rb->open(filename, O_RDONLY);
|
||||
if (fd < 0)
|
||||
|
@ -101,6 +100,10 @@ enum plugin_status run_overlay(struct plugin_api* rb, void* parameter,
|
|||
rb->splash(2*HZ, true, "Reading %s overlay failed.", name);
|
||||
return PLUGIN_ERROR;
|
||||
}
|
||||
/* Zero out bss area */
|
||||
rb->memset(header.load_addr + readsize, 0,
|
||||
header.end_addr - (header.load_addr + readsize));
|
||||
|
||||
return header.entry_point(rb, parameter);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue