diff --git a/man/coredump.conf.xml b/man/coredump.conf.xml index 6392270543d5d..7cb71f80aa72a 100644 --- a/man/coredump.conf.xml +++ b/man/coredump.conf.xml @@ -85,7 +85,8 @@ The maximum size in bytes of a core which will be processed. Core dumps exceeding this size may be stored, but the backtrace will not be generated. Like other sizes in this same - config file, the usual suffixes to the base of 1024 are allowed (B, K, M, G, T, P, and E). + config file, the usual suffixes to the base of 1024 are allowed (B, K, M, G, T, P, and E). Defaults + to 1G on 32bit systems, 32G on 64bit systems. Setting Storage=none and ProcessSizeMax=0 disables all coredump handling except for a log entry. @@ -96,8 +97,9 @@ ExternalSizeMax= JournalSizeMax= - The maximum (compressed or uncompressed) size in bytes of a core to be saved. Unit - suffixes are allowed just as in . + The maximum (compressed or uncompressed) size in bytes of a core to be saved in + separate files on disk (default: 1G on 32bit, 32G on 64bit systems) or in the journal (default: + 10M). Unit suffixes are allowed just as in . ExternalSizeMax=infinity sets the core size to unlimited. diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c index 20503cfd3b7a6..aac75dc552588 100644 --- a/src/coredump/coredump.c +++ b/src/coredump/coredump.c @@ -48,8 +48,14 @@ #include "uid-alloc-range.h" #include "user-util.h" -/* The maximum size up to which we process coredumps */ -#define PROCESS_SIZE_MAX ((uint64_t) (2LLU*1024LLU*1024LLU*1024LLU)) +/* The maximum size up to which we process coredumps. We use 1G on 32bit systems, and 32G on 64bit systems */ +#if __SIZEOF_POINTER__ == 4 +#define PROCESS_SIZE_MAX ((uint64_t) (1LLU*1024LLU*1024LLU*1024LLU)) +#elif __SIZEOF_POINTER__ == 8 +#define PROCESS_SIZE_MAX ((uint64_t) (32LLU*1024LLU*1024LLU*1024LLU)) +#else +#error "Unexpected pointer size" +#endif /* The maximum size up to which we leave the coredump around on disk */ #define EXTERNAL_SIZE_MAX PROCESS_SIZE_MAX