.\" Copyright (c) 1980 Regents of the University of California. .\" All rights reserved. The Berkeley software License Agreement .\" specifies the terms and conditions for redistribution. .\" .\" @(#)core.5 6.2 (Berkeley) %G% .\" .TH CORE 5 "" .UC 4 .SH NAME core \- format of memory image file .SH SYNOPSIS .B #include .SH DESCRIPTION The UNIX System writes out a memory image of a terminated process when any of various errors occur. See .IR sigvec (2) for the list of reasons; the most common are memory violations, illegal instructions, bus errors, and user-generated quit signals. The memory image is called `core' and is written in the process's working directory (provided it can be; normal access controls apply). .PP The maximum size of a .I core file is limited by .IR setrlimit (2). Files which would be larger than the limit are not created. .PP The core file consists of the .I u. area, whose size (in pages) is defined by the UPAGES manifest in the .RI < sys/param.h > file. The .I u. area starts with a .I user structure as given in .RI < sys/user.h >. The remainder of the core file consists first of the data pages and then the stack pages of the process image. The amount of data space image in the core file is given (in pages) by the variable .I u_dsize in the .I u. area. The amount of stack image in the core file is given (in pages) by the variable .I u_ssize in the .I u. area. The size of a ``page'' is given by the constant NBPG (also from .RI < sys/param.h >). .PP In general the debugger .IR adb (1) is sufficient to deal with core images. .SH "SEE ALSO" adb(1), dbx(1), sigvec(2), setrlimit(2)