Hello,
After Clang, GCC,... and more, I would like to discuss about a simple hello world and how much memory usage it may take.
Herewith the example:
The uname returns : FreeBSD Generic 12.0-CURRENT with r328637
On my machine, compiled with gcc, top gives about 10652K 2160K. How much you have (and which compiler)? Quite a lot actually.
(the machine is: RPI3 model b, with FreeBSD running at full speed with evilwm as main WM, with Xorg and evilwm (my personal config).
Ideally, for good comparison, we should compare this with assembly.
After Clang, GCC,... and more, I would like to discuss about a simple hello world and how much memory usage it may take.
Herewith the example:
Code:
#include <stdio.h>
int main()
{
do
{
puts("Hello World\n");
} while (getchar() != EOF);
return 0;
}
Code:
CPU: 5.2% user, 0.0% nice, 1.8% system, 0.0% interrupt, 93.0% idle
Mem: 83M Active, 70M Inact, 166M Wired, 97M Buf, 585M Free
Swap:
PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND
1350 spartrekus 5 29 0 105M 47796K CPU2 2 1:11 19.76% Xorg
1616 spartrekus 1 22 0 24384K 13064K select 3 0:01 5.66% xterm
1373 spartrekus 1 20 0 12080K 2600K nanslp 0 0:02 0.38% naclock
1631 spartrekus 1 20 0 13916K 3808K CPU3 3 0:00 0.34% top
1626 spartrekus 1 20 0 10652K 2160K ttyin 2 0:00 0.20% hellogt
1629 spartrekus 1 20 0 22992K 11360K select 0 0:01 0.13% xterm
1378 spartrekus 1 20 0 12024K 2624K nanslp 2 0:01 0.10% nclock
1570 spartrekus 1 20 0 25492K 14240K select 1 0:04 0.07% xterm
1376 spartrekus 1 20 0 22948K 9368K select 3 0:01 0.06% xterm
1361 spartrekus 1 20 0 22948K 9256K select 3 0:01 0.04% xterm
1607 spartrekus 1 20 0 15952K 6096K select 0 0:02 0.03
The uname returns : FreeBSD Generic 12.0-CURRENT with r328637
On my machine, compiled with gcc, top gives about 10652K 2160K. How much you have (and which compiler)? Quite a lot actually.
(the machine is: RPI3 model b, with FreeBSD running at full speed with evilwm as main WM, with Xorg and evilwm (my personal config).
Ideally, for good comparison, we should compare this with assembly.