Repository navigation
0.29.6: optional interfaces asked at run time; the PE rows by their container; the i386 record and DOS (technical experiment) - #95
Merged
Conversation
In an ok image openkal.fs, openkal.process and openkal.task are asked at run time (OKM_HAS_<X>=2): each name is imported weakly (SPEC 12.4), and a call reaches it where it is bound and the answer of the build without the interface where it is not. The image's requirements then name only what it calls unconditionally, so an image runs on an implementation without files, processes or threads, a firmware among them. Without openkal.region the allocator's memory is backed at once, and an arena is 16 MiB rather than a gibibyte. Libraries built for a known implementation are unchanged.
…interfaces from the implementation's statement
…32 MiB arenas and passes its alignment Measured under OVMF: mimalloc's page map was the firmware pool's fill pattern (a reservation read as zero on first commit), and a carried image's allocator could not reserve a second 256 MiB arena, nor over-allocate one. A reservation is now cleared when made, an arena is 32 MiB where memory is backed at once (MIMALLOC_ARENA_RESERVE is kept), and the alignment mimalloc states is passed to kal_alloc and recorded for kal_free.
…one; the i386 record of a triple with no system
…rd (measured under an i686 okrun)
Sunrisepeak
force-pushed
the
feat/0.29.6-optional-interfaces
branch
from
November 13, 2026 16:57
cdea179 to
33da3af
Compare
start_at multiplied in kal_uintptr and shifted by thirty-two, which is undefined where the word is thirty-two bits (i386). An unoptimised build's shift left the word as it was; an optimised one's index was anything, so an i686-dos-musl program built for release ended before main (measured: status 1 under DOSBox Staging, 7 unoptimised). The product is taken in uint64_t; where the word is sixty-four bits the value is the one it always was.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In an ok image
openkal.fs,openkal.processandopenkal.taskare asked at run time (OKM_HAS_<X>=2,port/src/okm_opt.h). Each name is imported weakly (SPEC 12.4); a call reaches it where it is bound and the answer of the build without the interface where it is not.import stdimage that uses neither files nor processes nor threads requiresopenkal.abort,openkal.env,openkal.memory,openkal.streamandopenkal.time(with openkal-llvm-runtime 0.20.3): 21 strong imports, 84 weak, measured on x86_64.openkal.regionthe allocator's memory is backed at once, so an arena is 16 MiB rather than a gibibyte.i386 and DOS
-z rela).mainwith status 1.Verified
std::map,std::formatand a vector: status 42.