Re: printf() stops working after some time
"Keith Packard" <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
Josef Wolf <[email protected]> writes: > PS: As I investigated the above issue, I've seen that printf() and friends are > using malloc/realloc and things. I'm getting pretty nervous about malloc > usage, since this is an embedded system which is supposed to run for > really long term (years/decades) and fragmentation would be a major issue. I had similar concerns, along with concerns about large RAM requirements and have replaced the whole stdio section of newlib with one from the GCC AVR project which does no dynamic memory allocation and uses only a few bytes of RAM for a bit of state. https://salsa.debian.org/electronics-team/toolchains/newlib-nano > Is it possible to disable malloc usage when compiling newlib? Yes, using the above version. -- -keith
signature.asc
(application/pgp-signature, 832 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEw4O3eCVWE9/bQJ2R2yIaaQAAABEFAlvPVjQACgkQ2yIaaQAA ABHASQ/8D/Vm3nulBY6a+OsSbH2R+68XIXFQY81uFLbROWTiHarG3G6I8pyP4pYR NdQ8hrJ0OpbquepPeM8ugMKWiLCcGoVaFegCJY0zZ5COgunnBqho8vWEQlBq5qjJ ADWOcBaQYFKfN0fq4IEsBWvxt0XG+FAUiTzbZyy7Uud9OPFxeI7faRgrcTSimdKl b8IDbE68bFnaC6NqVSj1TAED/c5E9uILpt4En2YPwo5p7p6RTZAxGSb5Y1TxJNVv agj/2sWYtPFMiWdQpRL/Ap26es1GJ10Y013ylKFx6xs8jlnGibfSkkhJb1onxu8k Twmu34i/1bg+r6jOaNpEpkoa/lnU/iNnmCWr7zE9osnpMJJvDIOAeiCc01FDPEYY t5INTlTbquzaPoRQ6xPFwJ7zLhCwYB0TTAf2Q2NDOePoy99SQ9cu8r/nNfKYb9KM JqLCYfKo5G9Jp2/NfJd3gUi7YsJuRAVhQB8kqjI/A9M2NPXWvxfnT8CF5pqkIOWp Z7ImoSspugGkmPLc3/xTClmh6JNN3LMDcHvmxzHF3UF5Qomdc/i5YQGDXd9mX+7h jVZVE97ZGxKTKfvo3u7NNR9FBh4CQQh86fq5PbDdPq8+PQZVM0mKqvECaCJKODfF BXApbxcILSzAV3onUtAoh1nQHLL2ymO8vJua0UKYYO+TDtwfQbA= =FCvM -----END PGP SIGNATURE-----