|
|
|
|
|
by solarkraft
2000 days ago
|
|
7 MB of RAM at idle, wow. But what can it run on top of it? Dotnet? Python? Go? AFAIK even the latter has a non- negligible runtime overhead. In general I wonder if it's actually practically usable for common tasks one could imagine. One advantage over micro-controllers is clear, though: Dynamic loading/execution of binaries, which no microcontroller OS seems to care about (why?). |
|
Python is not as "bad" as dotnet and go I'd think, as most of python is reference counted garbage collection (with a "full" GC just to break up cycles) while go and dotnet use essentially mark-and-sweep GC strategies which require a lot of object moving and thus scratch space.
Running a dotnet hello-world (on x86_64 linux admittedly) gives an RSS of 26MB, most of it mapped libraries and .net assemblies, some libraries shared between processes of course, like libc/libm/ld.so. But it also maps a ton memory for the JIT and the GC (including scratch space to move objects into during gc). With some swap, it may survive on a system with 25MB of free memory, but I'd think there'd be plenty of swap-thrashing and gc thrashing going on, making that less fun.
Running a python3's hello world comes in at 10MB RSS, but a large part of that is the shared libraries like libc/libm/ld.so. With some memory-conserving programming some real python programs may run just fine without excess swapping.
For comparison, a hello world in C maps about 1M RSS, while a rust one maps 2MB RSS, both times a big chunk in shared libraries specially libc.