*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> getaddressconf (2)              
Title
Content
Arch
Section
 

getaddressconf(2)

Contents


NAME    [Toc]    [Back]

       getaddressconf  - Get information about the system address
       space configuration

SYNOPSIS    [Toc]    [Back]

       #include <sys/types.h> #include <sys/addrconf.h>

       int getaddressconf(
               struct addressconf *buffer,
               size_t length );

PARAMETERS    [Toc]    [Back]

       Points to an array of addressconf  structures.   Specifies
       the  size  in  bytes of the array pointed to by the buffer
       parameter.

DESCRIPTION    [Toc]    [Back]

       The getaddressconf() function fills in the array of structures
  pointed to by the buffer parameter with information
       describing the configuration of process address  space  on
       the  system.   This  information is intended to be used by
       programs such as the program loader, which need to  manage
       the  contents of a process' address space by using  memory
       management primitives such as the mmap() function.

       The buffer parameter points to  an  array  of  addressconf
       structures,  occupying  a total of length bytes. Each element
 of the array describes a single area of  the  process
       address space. The addressconf structure is defined in the
       <sys/addrconf.h> header file, and it contains the  following
  member  definitions:  The base virtual address of the
       area. For an upward-growing area, this is the lowest  virtual
  address  in  the  area. For a downward-growing area,
       this is the lowest virtual address above the area.   Flags
       that  describe  the  area.  Following  are descriptions of
       these flags,  which  are  defined  in  the  sys/addrconf.h
       header  file: The area grows towards higher addresses. The
       base address specified is the lowest address in the  area.
       The  area  grows towards lower addresses. The base address
       specified is the lowest address above the area.  The  area
       always  starts at the specified base address. For example,
       on many machines the text area is a fixed area.  The  area
       floats  to  the  first available virtual address above the
       specified base address. For example, on many machines, the
       data area floats above the text area.

       Each  element  in  the  array  of  addressconf  structures
       describes a separate area of the process'  address  space.
       These  areas  have  been  defined  in the <sys/addrconf.h>
       header file; other areas may be defined in the  future  or
       on  other  machine  types.  The array elements are indexed
       with the following constants: The area that normally  contains
  the  text region of an absolute executable program.
       The area that normally contains  the  data  region  of  an
       absolute  executable program.  The area that normally contains
 the bss region of an  absolute  executable  program.
       The  area  that  normally  contains the process' user-mode
       stack.  The area reserved  for  the  text  region  of  the
       default  program  loader  see the exec_with_loader() function.
  The area  reserved  for  the  data  region  of  the
       default  program  loader.   The  area reserved for the bss
       region of the  default  program  loader.   The  area  that
       normally contains text regions of relocatable files loaded
       by the program  loader,  or  otherwise  mapped  using  the
       mmap()  function.   The  area  that normally contains data
       regions of relocatable files loaded by the program loader,
       or  otherwise  mapped using the mmap() function.  The area
       that normally contains  the  bss  regions  of  relocatable
       files  loaded  by the program loader, or anonymous regions
       mapped using the mmap() function.

       The  <sys/addrconf.h>  header  file   also   defines   the
       AC_N_AREAS  symbol to be the number of distinct areas that
       are currently  defined  for  this  system.  Normally,  the
       buffer parameter supplied to the getaddressconf() function
       should be large enough to hold information for  AC_N_AREAS
       regions.  If  buffer  is  not  large enough, the remaining
       information is truncated. The getaddressconf() call  fills
       in  the  first  AC_N_AREAS  records  in  the user-supplied
       buffer with the address configuration information for this
       system, as described above.

RETURN VALUES    [Toc]    [Back]

       Upon  successful  completion, the number of bytes actually
       written to the user's buffer  is  returned.  If  an  error
       occurs,  -1  is returned, and errno is set to indicate the
       error.

ERRORS    [Toc]    [Back]

       If the getaddressconf() function fails, errno may  be  set
       to  the  following value: The address specified for buffer
       is not valid.

SEE ALSO    [Toc]    [Back]

      
      
       Functions: brk(2), exec(2), exec_with_loader(2), mmap(2)



                                                getaddressconf(2)
[ Back ]
 Similar pages
Name OS Title
copyoutstr Tru64 General: Copies a null-terminated string from a kernel address space to a user address space
copyinstr Tru64 General: Copies a null-terminated string from a user address space to a kernel address space
copyin Tru64 General: Copies data from a user address space to a kernel address space
copyout Tru64 General: Copies data from a kernel address space to a user address space
dxsysinfo Tru64 Monitors system information such as CPU activity, memory, swap space, and file system usage
swapinfo HP-UX system paging space information
sizer Tru64 Displays information about the system or kernel, or creates a system configuration file
freeaddrinfo Tru64 Free system resources used by an address information structure
rc.conf FreeBSD system configuration information
system IRIX system configuration information directory
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service