Fix GetAllocation() Mechanism

I don't know why the function was ever written this way (do I not know something?), but here's an easy fix and an update to an example that used the call.

Technically, this does break compatibility...