C

ImageFiles.MCU.resourceRuntimeAllocationType

Description

This property is used to define the memory allocation type the platform should use while accessing the image assets. It is useful if the board offers different volatile memory (for example RAM, VRAM or HyperRAMâ„¢) alternatives, or supports different memory allocation strategies.

The property takes an integer value between 0 to 255 inclusive. The given value should match the memory allocator types known by the platform. On most platforms the range, [128,255], is dedicated to user-defined custom allocators.

If a target board supports custom runtime allocation types, they will be described in the board-specific documentation.

The default value varies depending on the resource cache policy configured. If the policy is OnStartup, the default value is 3 (DefaultPreload). If the policy is OnDemand (or the image is compressed), the default value is 1 (Image). The accepted values are defined in AllocationType.

Note: The OnDemand cache policy requires that image caching is enabled.

Usage

This property is accepted in the main application .qmlproject file, or a module .qmlproject file. It takes an integer.

Code example:

ImageFiles {
    MCU.resourceRuntimeAllocationType: 129
}

Note: This property can also be applied to every resource in the QmlProject file if defined in MCU.Config as follows:

MCU.Config {
    resourceRuntimeAllocationType: 129
}

Warning: Resource runtime allocation type in MCU.Config is also applied to every binary resource.

Since

This property was introduced in QmlProject API 1.3.

See also ImageFiles.MCU.resourceCachePolicy, ImageFiles.MCU.resourceStorageSection, ImageFiles.MCU.resourceCompression, Qt Quick Ultralite image caching, and QUL_RESOURCE_RUNTIME_ALLOCATION_TYPE.

Available under certain Qt licenses.
Find out more.