MaxAllocationCount per heap or global?

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?

Cheers,

Alex

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.

applicable spec quote:

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.

[QUOTE=krOoze;40796]applicable spec quote:

It’s not global nor per heap. It is per VkDevice property.[/QUOTE]

Though most applications will have just 1 device created at a time. So effectively it is global.