X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fcore.h;h=594026f6cc2cec7a0300c9e3318a4cfa9fd9861c;hb=0f3a5f2e8886d18d0b4f6485c38a42be629422ae;hp=e467f9e081d8b2fa80be6eadaa32ed3eb2a9b5af;hpb=a530bbe337109d898d5b4a001fc8f1afa3b5dc39;p=sbcl.git diff --git a/src/runtime/core.h b/src/runtime/core.h index e467f9e..594026f 100644 --- a/src/runtime/core.h +++ b/src/runtime/core.h @@ -9,43 +9,46 @@ * files for more information. */ -/* - * $Header$ - */ - #ifndef _CORE_H_ #define _CORE_H_ +#include "sbcl.h" #include "runtime.h" -#define CORE_PAGESIZE OS_VM_DEFAULT_PAGESIZE -#define CORE_END 3840 -#define CORE_NDIRECTORY 3861 -#define CORE_VALIDATE 3845 -#define CORE_VERSION 3860 -#define CORE_MACHINE_STATE 3862 -#define CORE_INITIAL_FUNCTION 3863 - -#define DYNAMIC_SPACE_ID (1) -#define STATIC_SPACE_ID (2) -#define READ_ONLY_SPACE_ID (3) - struct ndir_entry { -#ifndef alpha - long identifier; - long nwords; - long data_page; - long address; - long page_count; +#ifndef LISP_FEATURE_ALPHA + sword_t identifier; + sword_t nwords; + sword_t data_page; + sword_t address; + sword_t page_count; #else - u32 identifier; - u32 nwords; - u32 data_page; - u32 address; - u32 page_count; + u32 identifier; + u32 nwords; + u32 data_page; + u32 address; + u32 page_count; #endif }; -extern lispobj load_core_file(char *file); +/* Tri-state flag to determine whether we attempt to mark pages + * as targets for virtual memory deduplication (ala MADV_MERGEABLE + * on Linux). + * + * 1: Yes + * 0: No + * -1: default, yes for compressed cores, no otherwise. + */ +extern int merge_core_pages; + +extern lispobj load_core_file(char *file, os_vm_offset_t offset); +extern os_vm_offset_t search_for_embedded_core(char *file); + +/* arbitrary string identifying this build, embedded in .core files to + * prevent people mismatching a runtime built e.g. with :SB-SHOW + * against a .core built without :SB-SHOW (or against various grosser + * mismatches, e.g. a .core built with an old version of the code + * against a runtime with patches which add new C code) */ +extern unsigned char build_id[]; #endif