-
Notifications
You must be signed in to change notification settings - Fork 389
support booting with more than 4G of memory #2361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mazunki
wants to merge
7
commits into
includeos:main
Choose a base branch
from
mazunki:mem-large-pool
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a5f5982
remove deprecated python2 imports
mazunki ff12ecb
support memory above 4G
mazunki 30201be
add missing namespace
mazunki 6a3eb18
update example unikernel to show mounted mappings
mazunki c649036
add support for unassigning a mapping
mazunki f0cacb3
fixup! fix printf-type specifiers
mazunki b573403
include integration tests for booting and allocation on differently s…
mazunki File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,18 @@ | ||
| #include "kernel/memory.hpp" | ||
| #include <os> | ||
| #include <service> | ||
|
|
||
| void Service::start(const std::string& args){ | ||
| printf("Args = %s\n", args.c_str()); | ||
| printf("Try giving the service less memory, eg. 10MB in vm.json\n"); | ||
| printf("Service done. Shutting down...\n"); | ||
| std::println("Hello from the example unikernel!"); | ||
| std::println(); | ||
|
|
||
| std::println("Current virtual mappings:"); | ||
| for (const auto& entry : os::mem::vmmap()) | ||
| std::println(" {}", entry.second.to_string()); | ||
| std::println(); | ||
|
|
||
| std::println("Tip: Try changing how much memory you give to the service in vm.json"); | ||
| std::println("Service done. Shutting down..."); | ||
|
|
||
| os::shutdown(); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "mem": 128 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| cmake_minimum_required(VERSION 3.31.6) | ||
| set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) | ||
| project(service) | ||
| include(os) | ||
| set(SOURCES | ||
| service.cpp | ||
| ) | ||
| os_add_executable(memory_available "Memory available test" ${SOURCES}) | ||
| os_add_stdout(memory_available default_stdout) | ||
|
|
||
| configure_file(test.py ${CMAKE_CURRENT_BINARY_DIR}) | ||
|
|
||
| configure_file(vm-default.json ${CMAKE_CURRENT_BINARY_DIR}) | ||
| configure_file(vm-128m.json ${CMAKE_CURRENT_BINARY_DIR}) | ||
| configure_file(vm-2g.json ${CMAKE_CURRENT_BINARY_DIR}) | ||
| configure_file(vm-4g.json ${CMAKE_CURRENT_BINARY_DIR}) | ||
| configure_file(vm-6g.json ${CMAKE_CURRENT_BINARY_DIR}) | ||
| configure_file(vm-16g.json ${CMAKE_CURRENT_BINARY_DIR}) | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.