Introduction to Library Functions SIGSEGV(3) NAME sigsegv - Handling page faults in user mode SYNOPSIS #include DESCRIPTION Sigsegv is a set of functions for handling page faults in user mode. Multithreading is used to improve the performance of a program.A page fault occurs when a program tries to access to a region of memory that is currently not avail- able. Catching and handling a page fault is a useful tech- nique for implementing: o pageable virtual memory o memory-mapped access to persistent databases o generational garbage collectors o stack overflow handlers o distributed shared memory o ... The sigsegv functions are summarized in this section in the following groups: o Global SIGSEGV handlers o Local SIGSEGV handlers (a handler per memory area) o Stack overflow handlers The header defines the following symbols: o HAVE_SIGSEGV_RECOVERY o HAVE_STACK_OVERFLOW_RECOVERY o LIBSIGSEGV_VERSION The types listed below are defined as described in : SunOS 5.11 Last change: 13 Jan 2009 1 Introduction to Library Functions SIGSEGV(3) o sigsegv_handler_t o sigsegv_handler_t o stackoverflow_context_t o sigsegv_area_handler_t GLOBAL SIGSEGV HANDLERS int sigsegv_install_handler (sigsegv_handler_t handler); void sigsegv_deinstall_handler (void); LOCAL SIGSEGV HANDLERS void sigsegv_init (sigsegv_dispatcher* dispatcher); void* sigsegv_register (sigsegv_dispatcher* dispatcher, void* address, unsigned long len, sigsegv_area_handler_t handler, void* handler_arg); void sigsegv_unregister (sigsegv_dispatcher* dispatcher, void* ticket); int sigsegv_dispatch (sigsegv_dispatcher* dispatcher, void* fault_address); STACK OVERFLOW HANDLERS int stackoverflow_install_handler (stackoverflow_handler_t handler, void* extra_stack, unsigned long extra_stack_size); void stackoverflow_deinstall_handler (void); ATTRIBUTES See attributes(5) for descriptions of the following attri- butes: SunOS 5.11 Last change: 13 Jan 2009 2 Introduction to Library Functions SIGSEGV(3) ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Availability | SUNWlibsigsegv | |_____________________________|_____________________________| | Interface Stability | Uncommitted | |_____________________________|_____________________________| | Standard | See standards(5). | |_____________________________|_____________________________| SEE ALSO attributes(5), sigsegv(3), standards(5), sigsegv_install_handler, sigsegv_deinstall_handler(3), sigsegv_init(3), sigsegv_register(3), sigsegv_unregister(3), sigsegv_dispatch(3), stackoverflow_install_handler(3), stackoverflow_deinstall_handler(3) NOTES The libsigsegv project is located at http://libsigsegv.sourceforge.net. Source for libsigsegv is available on http://opensolaris.org. SunOS 5.11 Last change: 13 Jan 2009 3