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_opt
  • PAPI_get_hardware_info
  • PAPI_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 βœ¨πŸ’–