PMFREEEVENTRESULT(3)
π PMFREEEVENTRESULT π
okay bestie, so this is pmFreeHighResEventResult and pmFreeEventResult from the PCP library functions manual β they're the cleanup crew, the little guys who come in after the party and release the storage that got allocated for unpacked event records. very demure, very mindful, extremely necessary. π§Ήβ¨
πΈ NAME πΈ
pmFreeHighResEventResult, pmFreeEventResult β release storage allocated for unpacked event records π
β¨ C SYNOPSIS β¨
#include <pcp/pmapi.h>
void pmFreeHighResEventResult(pmResult **hrset);
void pmFreeEventResult(pmResult_v2 **rset);
cc ... -lpcp
like yes, that's the whole vibe. two functions, one header, one link flag, no notes. π
π¦ DESCRIPTION π¦
okay so picture this: you're processing event records, right? and you use pmUnpackHighResEventRecords(3) to unpack event records from a metric inside a pmResult structure where the value is of type PM_TYPE_HIGHRES_EVENT. the structure that comes back from pmUnpackHighResEventRecords(3) is a NULL pointer terminated array of pointers to pmResult structures, one for each event record. iconic data layout honestly. π
pmFreeHighResEventResult is the convenience method β the bestie who handles it for you β and it frees all of the pmResult structures and the array of pointers (hrset). all of it. gone. clean. periodt. π
similarly, pmFreeEventResult may be used to free the pmResult_v2 structures and array returned from the pmUnpackEventRecords routine when you're working with PM_TYPE_EVENT metrics. same energy, different struct. π«Ά
no cap, if you unpack it, you gotta free it. that's the whole plot. π
π SEE ALSO π
and that's the tea, bestie π this lil page is part of the Performance Co-Pilot collection, aka PCP β go forth and free your event results responsibly. mwah. πβ¨π
π¦ 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) 2014 Red Hat
- Copyright (c) 2010 Ken McDonell. All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms