KDK_BOARD_FREE(3)
💖 NAME 💖
kdk_board_free — 释放内存 (aka releasing memory, bestie, we are freeing the string, no leaks in this house 💅)
🦋 SYNOPSIS 🦋
#include <libkybios.h>
extern void kdk_board_free(char *info);
Link with -lkyhw.
🌸 DESCRIPTION 🌸
okay so listen. The main character job of this interface is to release the string that the mainboard module interface handed you back. That's it. That's the whole gig. ✨
The argument info is the return value of kdk_board_get_name, kdk_board_get_vendor, kdk_board_get_serial, or kdk_board_get_date — like, one of those functions. Those are the functions, periodt. So whatever those besties gave you, you bring it here to be freed. 🎀
🫶 RETURN VALUE 🫶
No return value. She gives you nothing back, she just does the thing. It's giving selfless. 😌
👑 EXAMPLES 👑
here's the whole vibe, copy-paste energy fr fr:
#include "stdio.h"
#include "libkyboard.h"
int main()
{
char *name = kdk_board_get_name();
char *vendor = kdk_board_get_vendor();
char *date = kdk_board_get_date();
char *serial = kdk_board_get_serial();
printf("name : %s", name);
printf("vendor : %s", vendor);
printf("date : %s", date);
printf("serial : %s", serial);
kdk_board_free(name);
kdk_board_free(vendor);
kdk_board_free(date);
kdk_board_free(serial);
return 0;
}
see how she grabs all four, prints all four, then frees all four? balanced. iconic. no leaks. 🧚
🌈 CONFORMING TO 🌈
These functions are as per the withdrawn POSIX.1e draft specification. (withdrawn, bestie, like it left the group chat 😭)
The following functions are Linux extensions: kdk_board_get_serial(), kdk_board_get_date(), kdk_board_get_name() and kdk_board_get_vendor().
⭐ SEE ALSO ⭐
kdk_board_get_serial(3), kdk_board_get_date(3), kdk_board_get_name(3) and kdk_board_get_vendor(3).
go read those first if you're confused, iykyk 🦋
that's the whole page, bestie 💖 this came from the Linux Programmer's Manual, dated Thu Aug 14 2023, and the page is KDK_BOARD_FREE(3). stay leak-free, ily 🎀✨
📦 where this page comes from
- arch rolling: libkysdk-system 3.0.1.4-1 · LGPL-3.0-or-later AND LGPL-2.1-only OR LGPL-3.0-only AND LGPL-2.1-only WITH Qt-LGPL-exception-1.1 OR LGPL-3.0-only WITH Qt-LGPL-exception-1.1 AND MIT
- ubuntu resolute: libkysdk-system-dev 3.0.1.2-0ubuntu1 · LGPL-3.0-only
- ubuntu stonking: libkysdk-system-dev 3.0.1.3-0ubuntu1 · LGPL-3.0-or-later
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms