2 ms·
You don't need any of that to do system programming in C#. Startup time of JIT runtime is not too bad. Similarly, garbage collector is fine if you don't load it
by Const-me 5y ago
You don't need any of that to do system programming in C#. Startup time of JIT runtime is not too bad. Similarly, garbage collector is fine if you don't load it too much (neither allocations/second nor bytes/second).
Here's my almost decade-old open source code which works for hours allocating very little (the process gets killed by the OS if exceeds 11MB of RAM): https://github.com/Const-me/SkyFM https://github.com/Const-me/SkyFM
Here's somewhat similar modern code, also multimedia related: https://github.com/Const-me/Vrmac/tree/master/VrmacVideo https://github.com/Const-me/Vrmac/tree/master/VrmacVideo
- platz 5y agoYou seem to have a habit in succeeding to explain what the code is while avoiding to explain what it does.
- Const-me 5y agoThe first one is streaming audio player for Windows phone 7+ platform. C# was the only language allowed by MS (the native code only arrived in Windows Phone 8), and the OS enforced strict memory limit. You exceed 11MB RAM, the OS kills background agent process, audio stops playing. The networking wasn’t great either, that worked on top of EDGE and early 3G. The second one is a general-purpose cross-platform graphics and multimedia library. The specific part I linked implement an equivalent of <Video> HTML element on top of Linux kernel APIs like V4L2 (video decoder) and ALSA (audio rendering). All that stuff is C# on top of .NET Core 2.1. It’s running great with JIT and GC, even consumes less memory than VLC player. If directly consuming low-level Linux kernel APIs and implementing non-trivial APIs on top of them is not a system programming, then I don’t know what is.