feat: port gcc to MontaukOS

This commit is contained in:
daniel committed 2026-07-17 15:47:45 +02:00
1 parent 324b18edda
commit 8e6b619b02
14 files changed
+493 -19

No files matched your search

+1 -1
View File
@@ -12,4 +12,4 @@
#pragma once
#define MONTAUK_BUILD_NUMBER 26
#define MONTAUK_BUILD_NUMBER 29
+10 -1
View File
@@ -52,7 +52,16 @@ namespace montauk::abi {
if (userVa + size < userVa || userVa + size > USER_SPACE_END) return 0;
uint64_t numPages = size / 0x1000;
if (g_heapAllocCount[slot] >= MaxHeapAllocs) return 0;
if (g_heapAllocCount[slot] >= MaxHeapAllocs) {
// Out of allocation records, not out of memory. Log it: a
// silent 0 here surfaced as bogus downstream errors (BFD
// turned NULL mallocs into "file format not recognized").
Kt::KernelLogStream(Kt::ERROR, "Heap")
<< "pid " << proc->pid << " (" << proc->name
<< ") hit MaxHeapAllocs (" << (uint64_t)MaxHeapAllocs
<< "), SYS_ALLOC refused";
return 0;
}
// Allocate physical pages and map them into the process
uint64_t mappedPages = 0;