Loading all strings from flash to RAM at startup
Original Reporter info from Mantis: Simon Ameis @SAmeis
-
Reporter name: Simon Ameis
Original Reporter info from Mantis: Simon Ameis @SAmeis
- Reporter name: Simon Ameis
Description:
The program loads all constant strings into RAM during startup.
Thus the developer has no control when which strings are loaded into RAM. Also it's impossible to store big string tables (e.g. 64 strings with 16 chars each = 1,088 bytes + array management) in flash and loading them only when needed.
There may be some solutions e.g. A) lazy loading of (string) constants on use or B) explicit loading by application code as it's done in C. Maybe there should be a compiler switch or type/variable modifier to indicate the behaviour auf the string constants.
Steps to reproduce:
Create a program for target embedded-AVR, define some string constants and compile.
Additional information:
There is a discussion in the German Lazarus Forum on this issue: http://www.lazarusforum.de/viewtopic.php?f=10&t=11068
Mantis conversion info:
- Mantis ID: 32479
- OS: embedded
- Version: 3.1.1