Looked through various forums and sites, with no clear answer.

Documentation simply says:
CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for buffer object.

The buffer I am trying to create (176603136 bytes) is much smaller than the amount queried with CL_DEVICE_MAX_MEM_ALLOC_SIZE (313580544 bytes), and I’m not receiving CL_INVALID_BUFFER_SIZE, so I don’t think the problem is related to having a buffer that is too large.

What are the possible reasons for a failure to allocate memory? What steps can I take to pinpoint the exact problem?


Is it possible that you have allocated other buffers besides this one?