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:
6
arena.c
6
arena.c
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user