Hands-On Embedded Programming with C++17
上QQ阅读APP看书,第一时间看更新

Resource limitations

Even though SBCs and SoCs tend to be fairly powerful, they are still no direct comparison to a modern desktop system or server. They have distinct limits in terms of RAM, storage size, and lack of expansion options.

With wildly varying amounts of (permanently installed) RAM, you have to consider the memory needs of the applications one wishes to run on the system before even considering the relatively sluggish CPU performance.

As SBCs tend to not have any, or significant amounts of, storage with a high endurance rate (meaning it can be written to often without limited write cycles to take into account), they generally do not have swap space and keep everything in the available RAM. Without the fallback of swap, any memory leaks and excessive memory usage will rapidly lead to a non-functioning or constantly restarting system.

Even though CPU performance on SBCs has increased significantly over the years for commonly available models, it is generally still advisable to use a cross-compiler to produce code for the SBC on a fast desktop system or server.

More on development issues and solutions will be covered in Chapter 6, Testing OS-Based Applications, and Appendix, Best Practices.