http server

This commit is contained in:
2026-07-07 19:40:25 +02:00
parent aea9ce911a
commit 9bbd382e10
13 changed files with 178 additions and 97 deletions

View File

@@ -33,7 +33,7 @@ func mem._request_space[size: i64] : mem.Block
alloc_size := (needed + 4095) & -4096
blk := _builtin_syscall(SYS_mmap, 0, alloc_size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) as mem.Block
if (blk as ptr as i64) == -1
if (blk as ptr as i64) == MAP_FAILED
panic("mem._request_space: failed to mmap")
blk->size = alloc_size - MEM_BLOCK_SIZE