Malloc mode
GPU memory allocation
Description
App Configuration Pane: GPU Code
Configuration Objects: coder.gpuConfig
The Malloc Mode parameter specifies the memory allocation mode to use in the generated CUDA® code. For more information, see Discrete and Managed Modes.
Note
Setting the Malloc Mode parameter to
unified
is not recommended when targeting NVIDIA® devices on the host development computer. See unified memory allocation mode on host being removed.
Settings
discrete
This value is the default value.
Uses the
cudaMalloc
API to transfer data between the CPU and the GPU. This mode has a traditional memory architecture with separate CPU and GPU global memory address space.unified
Uses the
cudaMallocManaged
API, which uses a unified CPU and GPU global memory address space.
Programmatic Use
Property:
MallocMode |
Values: "discrete" |
"unified" |
Default: "discrete" |
Version History
Introduced in R2018a