mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-18 08:27:53 +00:00
map_interval: Add interval allocator and drop hack
Drop the std::list hack to allocate memory indefinitely. Instead use a custom allocator that keeps references valid until destruction. This allocates fixed chunks of memory and puts pointers in a free list. When an allocation is no longer used put it back to the free list, this doesn't heap allocate because std::vector doesn't change the capacity. If the free list is empty, allocate a new chunk.
This commit is contained in:
parent
4d06e9f5cc
commit
f8678b635a
4 changed files with 79 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
|||
add_library(video_core STATIC
|
||||
buffer_cache/buffer_block.h
|
||||
buffer_cache/buffer_cache.h
|
||||
buffer_cache/map_interval.cpp
|
||||
buffer_cache/map_interval.h
|
||||
dirty_flags.cpp
|
||||
dirty_flags.h
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue