mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
Remove relocatable-heap target feature
The feature was previously enforced by make-config.sh on every platform except Windows. Now that heap relocation works on Windows too, we can remove the target feature altogether.
This commit is contained in:
parent
fe40ad5ae0
commit
dfefaba4e8
|
|
@ -159,13 +159,6 @@
|
|||
;;
|
||||
; :cycle-counter
|
||||
|
||||
;; Allow the main dynamic space to be allocated anywhere
|
||||
;; by the OS kernel regardless of the configuration-time value
|
||||
;; of dynamic-space-start.
|
||||
;; The downside is the potential need for startup-time relocation.
|
||||
;; Enabled by default if supported
|
||||
; :relocatable-heap
|
||||
|
||||
;; Build with support for an additional dynamic heap
|
||||
;; differing from the main dynamic heap in two ways:
|
||||
;; 1. it is guaranteed to reside below 4GB so that all pointers
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
:ppc64 :unix :elf :linux :relocatable-heap :64-bit :gencgc :stack-allocatable-closures :stack-allocatable-vectors :stack-allocatable-lists :stack-allocatable-fixed-objects :linkage-table :compare-and-swap-vops :alien-callbacks :big-endian :os-provides-dlopen :os-provides-dladdr :os-provides-putwc :os-provides-blksize-t :os-provides-suseconds-t :os-provides-getprotoby-r :os-provides-poll :sb-dynamic-core
|
||||
:ppc64 :unix :elf :linux :64-bit :gencgc :stack-allocatable-closures :stack-allocatable-vectors :stack-allocatable-lists :stack-allocatable-fixed-objects :linkage-table :compare-and-swap-vops :alien-callbacks :big-endian :os-provides-dlopen :os-provides-dladdr :os-provides-putwc :os-provides-blksize-t :os-provides-suseconds-t :os-provides-getprotoby-r :os-provides-poll :sb-dynamic-core
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
:riscv :unix :elf :linux :relocatable-heap :64-bit :gencgc :stack-allocatable-closures :stack-allocatable-vectors :stack-allocatable-lists :stack-allocatable-fixed-objects :linkage-table :little-endian :os-provides-dlopen :os-provides-dladdr :os-provides-putwc :os-provides-blksize-t :os-provides-suseconds-t :os-provides-getprotoby-r :os-provides-poll
|
||||
:riscv :unix :elf :linux :64-bit :gencgc :stack-allocatable-closures :stack-allocatable-vectors :stack-allocatable-lists :stack-allocatable-fixed-objects :linkage-table :little-endian :os-provides-dlopen :os-provides-dladdr :os-provides-putwc :os-provides-blksize-t :os-provides-suseconds-t :os-provides-getprotoby-r :os-provides-poll
|
||||
|
|
|
|||
|
|
@ -616,13 +616,6 @@ case "$sbcl_os" in
|
|||
exit 1
|
||||
;;
|
||||
esac
|
||||
case "$sbcl_os" in
|
||||
win32)
|
||||
;;
|
||||
*)
|
||||
printf ' :relocatable-heap' >> $ltf
|
||||
;;
|
||||
esac
|
||||
cd "$original_dir"
|
||||
|
||||
# FIXME: Things like :c-stack-grows-..., etc, should be
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
;;;; DYNAMIC-USAGE and friends
|
||||
|
||||
#+(and relocatable-heap gencgc)
|
||||
#+gencgc
|
||||
(define-alien-variable ("DYNAMIC_SPACE_START" sb-vm:dynamic-space-start) os-vm-size-t)
|
||||
#-sb-fluid
|
||||
(declaim (inline current-dynamic-space-start))
|
||||
|
|
|
|||
|
|
@ -298,8 +298,6 @@
|
|||
"At most one interpreter can be selected")
|
||||
("(and immobile-space (not x86-64))"
|
||||
":IMMOBILE-SPACE is supported only on x86-64")
|
||||
("(and immobile-space (not relocatable-heap))"
|
||||
":IMMOBILE-SPACE requires :RELOCATABLE-HEAP")
|
||||
("(and compact-instance-header (not immobile-space))"
|
||||
":COMPACT-INSTANCE-HEADER requires :IMMOBILE-SPACE feature")
|
||||
("(and immobile-code (not immobile-space))"
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@
|
|||
;; TODO: linkage-table could move with code, if the CPU
|
||||
;; prefers PC-relative jumps, and we emit better code
|
||||
;; (which we don't- for x86 we jmp via RBX always)
|
||||
#+relocatable-heap (member space '(fixedobj varyobj)))
|
||||
(member space '(fixedobj varyobj)))
|
||||
(start ptr)
|
||||
(end (+ ptr size)))
|
||||
(setf ptr end)
|
||||
|
|
@ -116,7 +116,7 @@
|
|||
,(- end start)))))))))))
|
||||
`(progn
|
||||
,@small-space-forms
|
||||
,(defconstantish (or #+relocatable-heap t) 'dynamic-space-start
|
||||
,(defconstantish t 'dynamic-space-start
|
||||
(or dynamic-space-start* ptr))
|
||||
(defconstant default-dynamic-space-size
|
||||
;; Build-time make-config.sh option "--dynamic-space-size" overrides
|
||||
|
|
|
|||
|
|
@ -252,10 +252,6 @@ struct heap_adjust {
|
|||
int n_relocs_rel; // relative
|
||||
};
|
||||
|
||||
#ifndef LISP_FEATURE_RELOCATABLE_HEAP
|
||||
#define adjust_word(ignore,thing) thing
|
||||
#define relocate_heap(ignore)
|
||||
#else
|
||||
#include "genesis/gc-tables.h"
|
||||
#include "genesis/cons.h"
|
||||
#include "genesis/hash-table.h"
|
||||
|
|
@ -629,7 +625,6 @@ set_adjustment(struct heap_adjust* adj,
|
|||
adj->range[j].delta = actual_addr - desired_addr;
|
||||
adj->n_ranges = j+1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(LISP_FEATURE_ELF) && defined(LISP_FEATURE_IMMOBILE_SPACE)
|
||||
extern int apply_pie_relocs(long,long,int);
|
||||
|
|
@ -739,9 +734,7 @@ process_directory(int count, struct ndir_entry *entry,
|
|||
if (id < 1 || id > MAX_CORE_SPACE_ID)
|
||||
lose("unknown space ID %ld addr %p", id, (void*)addr);
|
||||
|
||||
#ifndef LISP_FEATURE_RELOCATABLE_HEAP
|
||||
int enforce_address = 1;
|
||||
#elif defined(LISP_FEATURE_IMMOBILE_SPACE)
|
||||
#ifdef LISP_FEATURE_IMMOBILE_SPACE
|
||||
// Enforce address of readonly, static, immobile varyobj
|
||||
int enforce_address = id != DYNAMIC_CORE_SPACE_ID
|
||||
&& id != IMMOBILE_FIXEDOBJ_CORE_SPACE_ID
|
||||
|
|
@ -775,7 +768,6 @@ process_directory(int count, struct ndir_entry *entry,
|
|||
if (len != 0) {
|
||||
spaces[id].len = len;
|
||||
uword_t __attribute__((unused)) aligned_start;
|
||||
#ifdef LISP_FEATURE_RELOCATABLE_HEAP
|
||||
// Try to map at address requested by the core file.
|
||||
size_t request = spaces[id].desired_size;
|
||||
int sub_2gb_flag = (request & 1);
|
||||
|
|
@ -843,7 +835,6 @@ process_directory(int count, struct ndir_entry *entry,
|
|||
#endif
|
||||
break;
|
||||
}
|
||||
#endif /* LISP_FEATURE_RELOCATABLE_HEAP */
|
||||
|
||||
sword_t offset = os_vm_page_size * (1 + entry->data_page);
|
||||
if (compressed)
|
||||
|
|
@ -901,7 +892,6 @@ process_directory(int count, struct ndir_entry *entry,
|
|||
asm_routines_end = asm_routines_start +
|
||||
N_WORD_BYTES * sizetab[CODE_HEADER_WIDETAG]((lispobj*)asm_routines_start);
|
||||
|
||||
#ifdef LISP_FEATURE_RELOCATABLE_HEAP
|
||||
# ifdef LISP_FEATURE_GENCGC
|
||||
set_adjustment(adj, DYNAMIC_SPACE_START, // actual
|
||||
spaces[DYNAMIC_CORE_SPACE_ID].base, // expected
|
||||
|
|
@ -929,7 +919,6 @@ process_directory(int count, struct ndir_entry *entry,
|
|||
Please report this as a bug");
|
||||
relocate_heap(adj);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef LISP_FEATURE_IMMOBILE_SPACE
|
||||
/* Now determine page characteristics (such as object spacing)
|
||||
|
|
|
|||
|
|
@ -35,13 +35,11 @@ extern int foreign_function_call_active;
|
|||
extern os_vm_size_t dynamic_space_size;
|
||||
extern os_vm_size_t thread_control_stack_size;
|
||||
|
||||
#if defined(LISP_FEATURE_RELOCATABLE_HEAP)
|
||||
#ifdef LISP_FEATURE_CHENEYGC
|
||||
extern uword_t DYNAMIC_0_SPACE_START, DYNAMIC_1_SPACE_START;
|
||||
#else
|
||||
extern uword_t DYNAMIC_SPACE_START;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef LISP_FEATURE_IMMOBILE_SPACE
|
||||
extern uword_t FIXEDOBJ_SPACE_START, VARYOBJ_SPACE_START;
|
||||
extern uword_t immobile_space_lower_bound, immobile_space_max_offset;
|
||||
|
|
|
|||
|
|
@ -24,13 +24,11 @@
|
|||
#include "validate.h"
|
||||
#include "interr.h" /* for declaration of lose */
|
||||
|
||||
#if defined(LISP_FEATURE_RELOCATABLE_HEAP)
|
||||
#ifdef LISP_FEATURE_CHENEYGC
|
||||
uword_t DYNAMIC_0_SPACE_START, DYNAMIC_1_SPACE_START;
|
||||
#else
|
||||
uword_t DYNAMIC_SPACE_START;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
uword_t asm_routines_start, asm_routines_end;
|
||||
|
||||
|
|
@ -128,17 +126,6 @@ boolean allocate_hardwired_spaces(boolean hard_failp)
|
|||
void
|
||||
allocate_lisp_dynamic_space(boolean did_preinit)
|
||||
{
|
||||
#ifndef LISP_FEATURE_RELOCATABLE_HEAP
|
||||
// Allocate the largest space(s) first,
|
||||
// since if that fails, it's game over.
|
||||
#ifdef LISP_FEATURE_GENCGC
|
||||
ensure_space(NOT_MOVABLE, DYNAMIC_SPACE_START , dynamic_space_size);
|
||||
#else
|
||||
ensure_space(NOT_MOVABLE, DYNAMIC_0_SPACE_START, dynamic_space_size);
|
||||
ensure_space(NOT_MOVABLE, DYNAMIC_1_SPACE_START, dynamic_space_size);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Small spaces can be allocated after large spaces are.
|
||||
// The above code is only utilized when heap relocation is disabled.
|
||||
// And when so, failure to allocate dynamic space is fatal.
|
||||
|
|
|
|||
Loading…
Reference in a new issue