---
name: "core"
section: "5"
platform: "macos"
package: "xnu"
version: "12377.121.6"
release: "macOS 26.5"
platforms: ["linux", "freebsd", "openbsd", "macos"]
url: "https://new.carta.tech/core/5"
---

# core(5)

memory image file format

## NAME

**core** – memory image file format

## SYNOPSIS

**#include \<sys/param.h\>**

## DESCRIPTION

A small number of signals which cause abnormal termination of a process also cause a record of the process's in-core state to be written to disk for later examination by one of the available debuggers. (See [sigaction(2)](/sigaction/2.md).) This memory image is written to a file named by default *core.pid*, where *pid* is the process ID of the process, in the */cores* directory, provided the terminated process had write permission in the directory, and the directory existed.

The maximum size of a core file is limited by [setrlimit(2)](/setrlimit/2.md). Files which would be larger than the limit are not created.

The core file consists of the Mach-O(5) header as  described in the ⟨*mach-o/loader.h*⟩ file. The remainder of the core file consists of various sections described in the Mach-O(5) header.

## NOTE

Core dumps are disabled by default under Darwin/macOS. To re-enable core dumps, do one of the following

\* For subsequent processes spawned by launchd and their child processes, a privileged user can issue the command

```
# launchctl limit core unlimited
```

\* For susequent processes spawned by a shell, use [ulimit(1)](/ulimit/1.md) or [limit(1)](/limit/1.md) depending upon the shell.

```
% ulimit -c unlimited
```

or

```
% limit coredumpsize unlimited
```

To disable core dumps, set the limit to 0 using one of the aforementioned ways.

## SEE ALSO

[lldb(1)](/lldb/1.md), [setrlimit(2)](/setrlimit/2.md), [sigaction(2)](/sigaction/2.md), launchd.conf(5), launchd.plist(5), Mach-O(5), [sysctl(8)](/sysctl/8.md)

## HISTORY

A **core** file format appeared in Version 1 AT&T UNIX.
