4 .\" The contents of this file are subject to the terms of the
5 .\" Common Development and Distribution License (the "License").
6 .\" You may not use this file except in compliance with the License.
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 .\" or http://www.opensolaris.org/os/licensing.
10 .\" See the License for the specific language governing permissions
11 .\" and limitations under the License.
13 .\" When distributing Covered Code, include this CDDL HEADER in each
14 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 .\" If applicable, add the following below this CDDL HEADER, with the
16 .\" fields enclosed by brackets "[]" replaced with your own identifying
17 .\" information: Portions Copyright [yyyy] [name of copyright owner]
21 .\" Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
24 .TH SIGSEGV 3 "13 Jan 2009" "SunOS 5.11"
26 sigsegv \- Handling page faults in user mode
30 #include <\fBsigsegv.h\fR>
35 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 available. Catching and handling a page fault is a useful technique for implementing:
40 pageable virtual memory
46 memory-mapped access to persistent databases
52 generational garbage collectors
58 stack overflow handlers
64 distributed shared memory
74 The sigsegv functions are summarized in this section in the following
81 Global SIGSEGV handlers
87 Local SIGSEGV handlers (a handler per memory area)
93 Stack overflow handlers
97 The <sigsegv.h> header defines the following symbols:
103 HAVE_SIGSEGV_RECOVERY
109 HAVE_STACK_OVERFLOW_RECOVERY
119 The types listed below are defined as described in <sigsegv.h>:
136 stackoverflow_context_t
142 sigsegv_area_handler_t
145 .SH GLOBAL SIGSEGV HANDLERS
147 int \fBsigsegv_install_handler\fR (sigsegv_handler_t handler);
149 void \fBsigsegv_deinstall_handler\fR (void);
151 .SH LOCAL SIGSEGV HANDLERS
153 void \fBsigsegv_init\fR (sigsegv_dispatcher* dispatcher);
155 void* \fBsigsegv_register\fR (sigsegv_dispatcher* dispatcher,
157 void* address, unsigned long len,
158 sigsegv_area_handler_t handler,
162 void \fBsigsegv_unregister\fR (sigsegv_dispatcher* dispatcher,
167 int \fBsigsegv_dispatch\fR (sigsegv_dispatcher* dispatcher,
169 void* fault_address);
172 .SH STACK OVERFLOW HANDLERS
174 int \fBstackoverflow_install_handler\fR (stackoverflow_handler_t
176 handler, void* extra_stack,
177 unsigned long extra_stack_size);
180 void \fBstackoverflow_deinstall_handler\fR (void);
185 \fBattributes\fR(5), \fBsigsegv\fR(3), \fBstandards\fR(5), \fBsigsegv_install_handler, \fBsigsegv_deinstall_handler\fR(3), \fBsigsegv_init\fR(3), \fBsigsegv_register\fR(3), \fBsigsegv_unregister\fR(3), \fBsigsegv_dispatch\fR(3), \fBstackoverflow_install_handler\fR(3), \fBstackoverflow_deinstall_handler\fR(3)