I am using mmap to share system memory between processes but it seems opencl don't know how to use these memory.
A simple test program attached. If clEnqueueWriteBuffer is using mmaped memory, it will fail. But everything goes fine if using any other memory like aligned_alloc or stack.
Any help is appreciated.