PAPI_get_executable_info(3)
okay so bestie, welcome to PAPI_get_executable_info(3) from the PAPI manual β this is the page for getting the executable's address space info, and it's serving main-character energy. π
β¨
π NAME π
PAPI_get_executable_info β Get the executable's address space info. π¦
π SYNOPSIS π
The synopsis vibes live in the Detailed Description right below β keep scrolling, bestie, it's literally right there. π«Ά
π Detailed Description π
π§΅ C Interface π§΅
#include <papi.h>
const PAPI_exe_info_t *PAPI_get_executable_info( void );
This function returns a pointer to a structure containing information about the current program. No cap. π
π Parameters π
fullnameβ fully qualified path + filename of the executable.nameβ filename of the executable with no path information.text_start,text_endβ start and End addresses of program text segment.data_start,data_endβ start and End addresses of program data segment.bss_start,bss_endβ start and End addresses of program bss segment.
π¨ Return values π¨
PAPI_EINVALβ one or more of the arguments is invalid.
π Examples π
This is the example exactly as the page gives it β syntax and all, bestie:
const PAPI_exe_info_t *prginfo = NULL;
if ( ( prginfo = PAPI_get_executable_info( ) ) == NULL )
exit( 1 );
printf( "Path+Program: %s\n", exeinfo->fullname );
printf( "Program: %s\n", exeinfo->address_info.name );
printf( "Text start: %p, Text end: %p\n", exeinfo->address_info.text_start, exeinfo->address_info.text_end) ;
printf( "Data start: %p, Data end: %p\n", exeinfo->address_info.data_start, exeinfo->address_info.data_end );
printf( "Bss start: %p, Bss end: %p\n", exeinfo->address_info.bss_start, exeinfo->address_info.bss_end );
π See also π
PAPI_get_optPAPI_get_hardware_infoPAPI_exe_info_t
βοΈ Author βοΈ
Generated automatically by Doxygen for PAPI from the source code.
and that's the whole vibe, bestie π«Ά β this page is from PAPI version 7.2.0.0, dated Wed Jun 25 2025 19:30:48, and it's literally PAPI_get_executable_info(3). slay β¨π
π¦ where this page comes from
- nixos 26.05: papi 7.2.0
- nixpkgs unstable: papi 7.2.0
- opensuse-leap 16.0: papi-devel 7.2.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: papi-devel 7.2.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: papi-devel 7.2.0-160000.2.2 Β· BSD-3-Clause
- ubuntu resolute: libpapi-dev 7.2.0-2 Β· BSD-3-Clause
- ubuntu stonking: libpapi-dev 7.2.0-2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms