Check if the memory requirements is less then the input data size in the `createBuffer` function.
Check if the memory requirements is less then the input data size in the
createBufferfunction.