1PMFREERESULT(3)            Library Functions Manual            PMFREERESULT(3)
2
3
4

NAME

6       pmFreeResult, pmFreeHighResResult, - release storage allocated for per‐
7       formance metrics values
8

C SYNOPSIS

10       #include <pcp/pmapi.h>
11
12       void pmFreeResult(pmResult *result);
13       void pmFreeHighResResult(pmHighResResult *result);
14
15       cc ... -lpcp
16

DESCRIPTION

18       The variable sized results returned by pmFetch(3) and pmFetchHighRes(3)
19       are allocated below the Performance Metrics Application Programming In‐
20       terface (PMAPI) using a combination of  dynamic  (i.e.  malloc(3))  and
21       specialized allocation strategies.
22
23       Applications should call pmFreeResult to release the storage previously
24       allocated for result by pmFetch(3), when the application no longer  re‐
25       quires access to the pmResult structure.
26
27       Under  no  circumstances  should an application use free(result) to re‐
28       lease storage previously allocated for a pmResult by pmFetch(3).
29
30       Similarly, memory allocated for the high resolution timestamped  result
31       structure  returned from pmFetchHighRes(3) should be released by a call
32       to pmFreeHighResResult.
33

SEE ALSO

35       malloc(3), PMAPI(3), pmFetch(3) and pmFetchHighRes(3).
36
37
38
39Performance Co-Pilot                  PCP                      PMFREERESULT(3)
Impressum