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

NAME

6       pmFreeLabelSets  - release storage allocated for performance metric la‐
7       bels
8

C SYNOPSIS

10       #include <pcp/pmapi.h>
11
12       void pmFreeLabelSets(pmLabelSet *sets, int nsets);
13
14       cc ... -lpcp
15

DESCRIPTION

17       The array of label sets returned by pmLookupLabels(3) and related  APIs
18       are allocated below the Performance Metrics Application Programming In‐
19       terface (PMAPI) using a variety of calls to the system's dynamic memory
20       allocation (i.e. malloc(3)) interfaces.
21
22       Applications  should call pmFreeLabelSets to release the storage previ‐
23       ously allocated for the label sets array when access to  the  structure
24       is  no  longer  needed.  The return value from pmLookupLabels indicates
25       the number of elements in the label sets  array,  and  this  should  be
26       passed in using the nsets parameter.
27
28       Under  no circumstances should an application use free(labelset) to re‐
29       lease storage previously allocated  for  a  pmLabelSet  by  pmLookupLa‐
30       bels(3) or related APIs.
31
32       To simplify error handling, if sets is NULL then pmFreeLabelSets simply
33       returns without freeing any storage.
34

SEE ALSO

36       malloc(3), PMAPI(3) and pmLookupLabels(3).
37
38
39
40Performance Co-Pilot                  PCP                   PMFREELABELSETS(3)
Impressum