PMFREERESULT(3)
π PMFREERESULT(3) π
okay so bestie, welcome to the Library Functions Manual page for pmFreeResult β this is the one where we clean up after ourselves, and honestly? iconic behavior. π§Ήβ¨
β¨ NAME β¨
pmFreeResult β release storage allocated for performance metrics values π«Ά
πΈ C SYNOPSIS πΈ
#include <pcp/pmapi.h>
void pmFreeResult(pmResult *result);
cc ... -lpcp
π DESCRIPTION π
So the variable sized results you get back from pmFetch(3)? They're allocated down below the Performance Metrics Application Programming Interface (PMAPI) using a combo of dynamic allocation (aka malloc(3)) and some specialized allocation strategies. it's giving β¨layeredβ¨
When your app is done looking at that pmResult structure β like, no longer requires access to it, periodt β you call pmFreeResult to release the storage that pmFetch(3) previously allocated for result. that's the whole job. bestie job. π
π¨ NO CAP, LISTEN UP: under no circumstances should an application usefree(result)to release storage previously allocated for apmResultbypmFetch(3). do not do it. not even once. the malloc/free duo does not understand what's going on in there and it will not end cute. π
π COMPATIBILITY π
okay history lesson, stay with me π¦
Before PCP 7.0, the timestamp field in the pmResult struct was a struct timeval. To support the PMAPI transition, the old interface and semantics can still be used β but only if applications are recompiled with -DPMAPI_VERSION=2. so like, retro mode, activated manually, iykyk.
Also, for a time in PCP 6.x there was a routine with the same semantics as the current pmFreeResult called pmFreeHighResResult. It's deprecated now bestie, and compile-time support for pmFreeHighResResult will be removed in a future release. so likeβ¦ don't get attached. π
π SEE ALSO π
and that's the page!! π brought to you by Performance Co-Pilot, PCP, and this very PMFREERESULT(3) footer moment β mwah, go free your results responsibly, love u bye ππΈ
π¦ where this page comes from
- arch rolling: pcp 7.2.2-2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later AND CC-BY-3.0
- centos-stream 10: pcp-doc 7.1.5-6.el10 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.0.1-1.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.2.1-1.fc43
- fedora 43: pcp-doc 7.2.2-1.fc43
- fedora 43: pcp-doc 7.2.2-2.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.1.0-6.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.2.1-1.fc44
- fedora 44: pcp-doc 7.2.2-1.fc44
- fedora 44: pcp-doc 7.2.2-2.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- ubuntu resolute: libpcp4-dev 7.1.1-1
- ubuntu stonking: libpcp4-dev 7.2.1-2build1
- Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms