Skip to content

Commit

Permalink
vulkan/malloc: bump up maximum slab age
Browse files Browse the repository at this point in the history
Helps avoid GC/realloc thrashing on high FPS displays, especially with
the fact that mpv now calls *both* pl_gpu_flush() and
pl_swapchain_submit(), leading to two GC age ticks per frame.

Probably a more principled solution would be better (e.g. wallclock
age), but for now this is a quick improvement to the status quo.
  • Loading branch information
haasn committed Aug 20, 2023
1 parent 1ad158b commit 60d776c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vulkan/malloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

// How long to wait before garbage collecting empty slabs. Slabs older than
// this many invocations of `vk_malloc_garbage_collect` will be released.
#define MAXIMUM_SLAB_AGE 8
#define MAXIMUM_SLAB_AGE 32

// A single slab represents a contiguous region of allocated memory. Actual
// allocations are served as pages of this. Slabs are organized into pools,
Expand Down

0 comments on commit 60d776c

Please sign in to comment.