C
<platform/mem.h> - Platform abstraction functionality
Provides abstraction for the memory allocation. More...
Header: | #include <platform/mem.h> |
Functions
void | printHeapStats() |
void | printStackStats() |
void | qul_free(void *ptr) |
void * | qul_malloc(std::size_t size) |
void * | qul_realloc(void *ptr, std::size_t new_size) |
Detailed Description
This header file contains all the memory allocation functions of the platform abstraction that are used by the Qt Quick Ultralite core library.
Function Documentation
[since Qt Quick Ultralite (Platform) 1.5]
void printHeapStats()
Print heap usage statistics to stderr.
This function was introduced in Qt Quick Ultralite (Platform) 1.5.
[since Qt Quick Ultralite (Platform) 1.5]
void printStackStats()
Print stack usage statistics to stderr.
This function was introduced in Qt Quick Ultralite (Platform) 1.5.
[since Qt Quick Ultralite (Platform) 1.5]
void qul_free(void *ptr)
Frees a memory block allocated by qul_malloc.
ptr is the pointer to the memory block to be freed.
This function was introduced in Qt Quick Ultralite (Platform) 1.5.
See also Qul::Platform::qul_malloc(std::size_t size) and Qul::Platform::qul_realloc(void *ptr, std::size_t new_size).
[since Qt Quick Ultralite (Platform) 1.5]
void *qul_malloc(std::size_t size)
Allocates memory in the way optimal for the platform.
size is the size of the requested block of memory, in bytes.
All of Qt Quick Ultralite performs dynamic memory allocation through this function.
Memory allocated using this function must be freed using qul_free. Resizing the memory block that was allocated can also be done using qul_realloc.
Might return NULL if there is not sufficient memory to satisfy the request.
This function was introduced in Qt Quick Ultralite (Platform) 1.5.
See also Qul::Platform::qul_free(void *ptr) and Qul::Platform::qul_realloc(void *ptr, std::size_t new_size).
[since Qt Quick Ultralite (Platform) 1.5]
void *qul_realloc(void *ptr, std::size_t new_size)
Attempt to resize a memory block allocated with qul_malloc.
ptr is the pointer the the previously allocated memory block, and new_size is the new size for the memory block, in bytes.
Might return NULL if there is not sufficient memory to satisfy the request.
This function was introduced in Qt Quick Ultralite (Platform) 1.5.
See also Qul::Platform::qul_malloc(std::size_t size) and Qul::Platform::qul_free(void *ptr).
Available under certain Qt licenses.
Find out more.