OpenCL™ “global” memory is allocated from system (host) memory for CPU. The amount of available memory depends on the amount of computer system memory and the operating system number of bits. For example, a system with 4GB of RAM running on a 32-bit OS usually has less than 3GB available for system memory. This impacts the amount of global memory available for the CPU device. Use the
clGetDeviceInfo(…,CL_DEVICE_GLOBAL_MEM_SIZE)query to get information on the exact available amount. If you fail to allocate resources required by the OpenCL™ implementation on the device, you receive the
Global memory performance depends on the frequency of DDR memory.
Since global memory is shared between CPU and the system host, it is important to use mapping for memory objects. See the Map Memory Objects (USE_HOST_PTR) section for more information.