We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4c9da8 commit dcf40f6Copy full SHA for dcf40f6
2 files changed
example/src/main.cpp
@@ -1,9 +1,18 @@
1
+#include "kernel/memory.hpp"
2
#include <os>
3
#include <service>
4
5
void Service::start(const std::string& args){
- printf("Args = %s\n", args.c_str());
6
- printf("Try giving the service less memory, eg. 10MB in vm.json\n");
7
- printf("Service done. Shutting down...\n");
+ std::println("Hello from the example unikernel!");
+ std::println();
8
+
9
+ std::println("Current virtual mappings:");
10
+ for (const auto& entry : os::mem::vmmap())
11
+ std::println(" {}", entry.second.to_string());
12
13
14
+ std::println("Tip: Try changing how much memory you give to the service in vm.json");
15
+ std::println("Service done. Shutting down...");
16
17
os::shutdown();
18
}
example/src/vm.json
@@ -0,0 +1,3 @@
+{
+ "mem": 128
+}
0 commit comments