I’m currently implementing the memory management for my vulkan application and was asking myself if the maxAllocationCount is per heap or for all heaps together.
Did not find anything specific about this so I assume that it’s the global allocation limit. Does anybody know?
Yes, this is a global allocation limit and not per-heap. Lower limit for this is 4096 as per-spec, so you shouldn’t bump into this limit if you allocate large chunks.
There is an implementation-dependent maximum number of memory allocations which can be simultaneously created [!]on a device[!]. This is specified by the maxMemoryAllocationCount member of the VkPhysicalDeviceLimits structure. If maxMemoryAllocationCount is exceeded, vkAllocateMemory will return VK_ERROR_TOO_MANY_OBJECTS.
It’s not global nor per heap. It is per VkDevice property.