Rate This Document
Findability
Accuracy
Completeness
Readability

KqMallocGetVersion

Function Usage

Obtain the KQMalloc version information.

Function Syntax

KqMallocResult KqMallocGetVersion(KqMallocProVersion *packageInfo);

Parameters

Parameter

Description

Value Range

Input/Output

packageInfo

Pointer to the product information structure.

The value cannot be NULL.

Output

Return Value

  • Success: KQMALLOC_STS_NO_ERR is returned.
  • Failure: An error code is returned.

Error Code

Error Code

Description

KQMALLOC_STS_NULL_PTR_ERR

The KqMallocProVersion pointer is null.

Example

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "kqmalloc.h"

void GetProductVersionExample()
{
    KqMallocProVersion versionGet;
    KqMallocResult result = KqMallocGetVersion(&versionGet);
    if (result == KQMALLOC_STS_NO_ERR) {
        printf("Product Name: %s\n", versionGet.productName);
        printf("Product Version: %s\n", versionGet.productVersion);
        printf("Component Name: %s\n", versionGet.componentName);
        printf("Component Version: %s\n", versionGet.componentVersion);
        printf("Component AppendInfo: %s\n", versionGet.componentAppendInfo);
        printf("Software Name: %s\n", versionGet.softwareName);
        printf("Software Version: %s\n", versionGet.softwareVersion);
    }
}

int main(void) {
    GetProductVersionExample();
    return 0;
}

Output:

Product Name: Kunpeng Boostkit
Product Version: 23.0.0
Component Name: BoostKit-ksl
Component Version: 2.1.0
Component AppendInfo: gcc
Software Name: boostkit-ksl-kqmalloc
Software Version: 2.1.0

The version number and compile time are subject to the running results in your environment. The preceding results are for reference only.