|Home > Optimizing OpenCL for Mali GPUs > Optimizing memory allocation > 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.
Arm recommends the following:
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.