diff options
Diffstat (limited to 'Source/Applications/Shell/Applets/free.cpp')
-rw-r--r-- | Source/Applications/Shell/Applets/free.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/Applications/Shell/Applets/free.cpp b/Source/Applications/Shell/Applets/free.cpp new file mode 100644 index 0000000..3217574 --- /dev/null +++ b/Source/Applications/Shell/Applets/free.cpp @@ -0,0 +1,12 @@ +#include <App/ShellApp.proto.h> +#include <Binding/Sys.ns.h> + +class free : public ShellApp { + public: + free() : ShellApp("free", "Get the amount of system free RAM") {} + int run() { + outvt << "Free RAM: " << (s64int)Sys::freeRam() << " Kio of " << (s64int)Sys::totalRam() << " Kio\n"; + } +}; + +APP(free); |