In xcode gpu frame capture, what's the difference between 'allocated size' and 'lenght' of MTLBuffer?

Hi,
I've been working on performance optimization for our game in IOS. In a captured a gpu frame, the MTLBuffer's 'Length' is the size I requested. But there's a another property called 'allocated size' which I don't understand what it is.
The question is when we talk about gpu memory consumption, which property are we really care about?

Thanks
https://developer.apple.com/documentation/metal/mtlbuffer/1515373-length
https://developer.apple.com/documentation/metal/mtlresource/2915287-allocatedsize

I'd say what matters is the allocated size, and I suppose that it could be bigger that the requested length to satisfy alignment constraints.
Thansk Ceylo.
I agree the the allocated size should satisfy the alignment constraints. What confused me is that some allocated size is way bigger than the requested buffer length. Below are some rows of the allocated size and buffer length(The left side is the allocated size and the right side is the corresponding buffer length).
49152 40000
49152 40000
131072 12000
131072 12000
As you see the third allocated size is more than 10x of the logical size. So I supposed there might be some other reason. Maybe one allocated size can be shared by multiple mtlbuffer I guess.

By the way, I did some tests on my ipad. When the allocated size came to 1.5GB and with about 200MB logical buffer, the application didn't crash.
In xcode gpu frame capture, what's the difference between 'allocated size' and 'lenght' of MTLBuffer?
 
 
Q