rework how we size the HandleAllocator's pools
- update the pools sizes for metal and vulkan, which were very outdated. - add debug code on all backends to print the size of each handle (with a compile time switch) The most important change is that now the 3 pools of HandleAllocator are sized so that each can accommodate about the same amount of handles. This makes it easier to reason about. The total amount of handles is three times that, since there are 3 pools. We also try to allocate the buckets so that handles are evenly distributed, however, that's very hand wavy. With the current setup the number of handles per pool is as follows: - GL : 3240 / pool / MiB - VK : 1820 / pool / MiB - MTL: 1310 / pool / MiB
This commit is contained in:
committed by
Mathias Agopian
parent
50d9d9f139
commit
d640ba853b
@@ -393,6 +393,10 @@ public:
|
||||
: mFreeList(begin, end, ELEMENT_SIZE, ALIGNMENT, OFFSET) {
|
||||
}
|
||||
|
||||
PoolAllocator(void* begin, size_t size) noexcept
|
||||
: mFreeList(begin, static_cast<char *>(begin) + size, ELEMENT_SIZE, ALIGNMENT, OFFSET) {
|
||||
}
|
||||
|
||||
template <typename AREA>
|
||||
explicit PoolAllocator(const AREA& area) noexcept
|
||||
: PoolAllocator(area.begin(), area.end()) {
|
||||
|
||||
Reference in New Issue
Block a user