8.3.2 Use CL_MEM_ALLOC_HOST_PTR to avoid copying memory

The Mali™ GPU can access the memory buffers created by clCreateBuffer(CL_MEM_ALLOC_HOST_PTR). This is the preferred method to allocate buffers because data copies are not required.

This method of allocating buffers is shown in the following figure.
Figure 8-1 Memory buffer created by clCreateBuffer(CL_MEM_ALLOC_HOST_PTR)
To view this graphic, your browser must support the SVG format. Either install a browser with native support, or install an appropriate plugin such as Adobe SVG Viewer.


  • You must make the initial memory allocation through the OpenCL API.
  • Always use the latest pointer returned.
    If a buffer is repeatedly mapped and unmapped, the address the buffer maps into is not guaranteed to be the same.
Non-ConfidentialPDF file icon PDF versionARM 100614_0300_00_en
Copyright © 2012, 2013, 2015, 2016 ARM. All rights reserved.