sm501: fixup allocation code to be 64bit resource compliant