diff options
| author | 2026-08-26 15:08:16 -0400 | |
|---|---|---|
| committer | 2026-08-26 15:08:16 -0400 | |
| commit | 6094c907b26e21f13373bae6bf3306dbae40af3c (patch) | |
| tree | 981864ddb1ab9749d3e10a81edc782311826e101 /src/cache/backings/memory.c | |
| parent | da9bddc70ff8544f3294b880d719c4605e87ad97 (diff) | |
| download | camu-6094c907b26e21f13373bae6bf3306dbae40af3c.tar.gz camu-6094c907b26e21f13373bae6bf3306dbae40af3c.tar.bz2 camu-6094c907b26e21f13373bae6bf3306dbae40af3c.zip | |
Update deps, small changes and cleanup
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'src/cache/backings/memory.c')
| -rw-r--r-- | src/cache/backings/memory.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cache/backings/memory.c b/src/cache/backings/memory.c index 063c1c5..ba0bb54 100644 --- a/src/cache/backings/memory.c +++ b/src/cache/backings/memory.c @@ -6,7 +6,11 @@ static void ensure_allocated(struct cch_backing_memory *mem, off_t amount) { if (amount > mem->expanse) mem->expanse = amount; if (amount > mem->alloc) { - mem->alloc = al_next_power_of_two(amount); + if (amount < MB(8)) { + mem->alloc = al_next_power_of_two(amount); + } else { + mem->alloc = amount; + } mem->data = (u8 *)al_realloc(mem->data, mem->alloc); } } |