MxMemMallocPolicy
Description
Enumeration class used by DeviceMallocFuncHookReg.
Structure Definition
1 2 3 4 5 6 7 8 9 10 | typedef enum MxMemMallocPolicy { MX_MEM_MALLOC_HUGE_FIRST, MX_MEM_MALLOC_HUGE_ONLY, MX_MEM_MALLOC_NORMAL_ONLY, MX_MEM_MALLOC_HUGE_FIRST_P2P, MX_MEM_MALLOC_HUGE_ONLY_P2P, MX_MEM_MALLOC_NORMAL_ONLY_P2P, MX_MEM_TYPE_LOW_BAND_WIDTH = 0x0100, MX_MEM_TYPE_HIGH_BAND_WIDTH = 0x1000, } MxMemMallocPolicy; |
Parameters
Parameter |
Description |
|---|---|
MX_MEM_MALLOC_HUGE_FIRST |
When the allocated memory is less than or equal to 1 MB, only normal page memory is allocated even under this memory allocation policy. When the allocated memory is greater than 1 MB, the allocation of huge page memory is prioritized. If the huge page memory is insufficient, normal page memory is allocated. |
MX_MEM_MALLOC_HUGE_ONLY |
Allocate only huge page memory. If the huge page memory is insufficient, an error is returned. |
MX_MEM_MALLOC_NORMAL_ONLY |
Allocate only normal page memory. If the normal page memory is insufficient, an error is returned. |
MX_MEM_MALLOC_HUGE_FIRST_P2P |
Applicable to inter-device memory copy. Prioritize the allocation of huge page memory. If huge page memory is insufficient, allocate normal page memory. |
MX_MEM_MALLOC_HUGE_ONLY_P2P |
Applicable to inter-device memory copy. Allocate only huge page memory. If the huge page memory is insufficient, an error is returned. |
MX_MEM_MALLOC_NORMAL_ONLY_P2P |
Applicable to inter-device memory copy. Allocate only normal page memory. If the normal page memory is insufficient, an error is returned. |
MX_MEM_TYPE_LOW_BAND_WIDTH = 0x0100 |
Allocate memory from the physical memory with low bandwidth. This option is invalid. By default, the system selects the allocation rule based on hardware-supported memory types. |
MX_MEM_TYPE_HIGH_BAND_WIDTH = 0x1000 |
Allocate memory from the physical memory with high bandwidth. This option is invalid. By default, the system selects the allocation rule based on hardware-supported memory types. |