Maintenance4 contains the maxBufferSize property that contains the
maximum allowed buffer allocation.
This PR uses this property to precheck if allocations will fail. It
was an attempt to improve the reliability of failing allocations but
currently they fail at the driver side.
Pull Request: https://projects.blender.org/blender/blender/pulls/145555