Reworking IO Ring pipeline to fully support multiple infilght files

Reworking the filequeue, the buffer chaining logic and the error
handling.
Renaming functions.
Fix bug in arena.
This commit is contained in:
2026-04-23 14:13:48 +01:00
parent b8e577b5bb
commit ab31776658
7 changed files with 365 additions and 383 deletions

View File

@@ -437,12 +437,14 @@ void *arena_push(mem_arena **arena_ptr, u64 size, bool zero) { // mk push
Commit memory if needed
------------------------------------------------------------ */
if (local_post > selected->commit_pos) {
u64 new_commit = ALIGN_UP_POW2(local_post, arena_pagesize());
if (local_post > selected->commit_pos -
ALIGN_UP_POW2(sizeof(mem_arena), selected->align)) {
u64 new_commit = ALIGN_UP_POW2(local_post + ALIGN_UP_POW2(sizeof(mem_arena), selected->align), arena_pagesize());
new_commit = MIN(new_commit, selected->reserve_size);
if (!plat_mem_commit((u8 *)selected + selected->commit_pos,
new_commit - selected->commit_pos)) {
printf("ERROR: Could not commit memory!\n");
return NULL;
}