Files
MontaukOS/kernel
danielandClaude Fable 5 2f1010b02e fix: stream ELF program loading instead of buffering whole files
ElfLoad read the entire binary into one kernel heap allocation before
copying segments out. The heap grows through ReallocConsecutive, so a
40 MB cc1plus required 10k physically contiguous pages - effectively
impossible after boot with a 368 MB ramdisk module resident, and the
failed spawn surfaced as posix_spawnp ENOENT in the gcc driver.

The loader now reads the ELF header and program header table (bounded
at 64 entries), then copies each PT_LOAD page and the PT_TLS template
directly from the VFS into freshly mapped process pages. Peak kernel
memory per load drops from fileSize to one page regardless of binary
size. Boot-smoke verified: all userspace loads through this path.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-17 10:25:30 +02:00
..
2025-02-27 19:48:03 +04:00
2025-02-27 19:48:03 +04:00
2026-05-30 10:22:40 +02:00
2025-02-27 19:48:03 +04:00
2025-02-27 19:48:03 +04:00
2025-04-17 21:54:25 +02:00