-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hook up OS.MM.Heap_pages.{total,used}
The total number of heap pages is computed from the Solo5 heap size (si->heap_size) and the number of used pages is computed from the result returned by dlmalloc's malloc_footprint(). Note that mallinfo() is deliberately not used in the latter case as that call is expensive and existing unikernels rely on this interface being cheap to call.
- Loading branch information
Showing
3 changed files
with
22 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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 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 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,4 +1,4 @@ | ||
module Heap_pages = struct | ||
external total: unit -> int = "stub_heap_get_pages_total" [@@noalloc] | ||
external used: unit -> int = "stub_heap_get_pages_used" [@@noalloc] | ||
external total: unit -> int = "mirage_xen_heap_get_pages_total" [@@noalloc] | ||
external used: unit -> int = "mirage_xen_heap_get_pages_used" [@@noalloc] | ||
end |