... |
... |
@@ -2698,6 +2698,43 @@ maybe_static_array_p(lispobj header) |
2698
|
2698
|
return result;
|
2699
|
2699
|
}
|
2700
|
2700
|
|
|
2701
|
+static int
|
|
2702
|
+scav_static_vector(lispobj object)
|
|
2703
|
+{
|
|
2704
|
+ lispobj *ptr = (lispobj *) PTR(object);
|
|
2705
|
+ lispobj header = *ptr;
|
|
2706
|
+
|
|
2707
|
+ if (debug_static_array_p) {
|
|
2708
|
+ fprintf(stderr, "Not in Lisp spaces: object = %p, ptr = %p\n",
|
|
2709
|
+ (void*)object, ptr);
|
|
2710
|
+ fprintf(stderr, " Header value = 0x%lx\n", (unsigned long) header);
|
|
2711
|
+ }
|
|
2712
|
+
|
|
2713
|
+ if (maybe_static_array_p(header)) {
|
|
2714
|
+ int static_p;
|
|
2715
|
+
|
|
2716
|
+ if (debug_static_array_p) {
|
|
2717
|
+ fprintf(stderr, "Possible static vector at %p. header = 0x%lx\n",
|
|
2718
|
+ ptr, (unsigned long) header);
|
|
2719
|
+ }
|
|
2720
|
+
|
|
2721
|
+ static_p = (HeaderValue(header) & 1) == 1;
|
|
2722
|
+ if (static_p) {
|
|
2723
|
+ /*
|
|
2724
|
+ * We have a static vector. Mark it as
|
|
2725
|
+ * reachable by setting the MSB of the header.
|
|
2726
|
+ */
|
|
2727
|
+ *ptr = header | 0x80000000;
|
|
2728
|
+ if (debug_static_array_p) {
|
|
2729
|
+ fprintf(stderr, "Scavenged static vector @%p, header = 0x%lx\n",
|
|
2730
|
+ ptr, (unsigned long) header);
|
|
2731
|
+ }
|
|
2732
|
+ }
|
|
2733
|
+ }
|
|
2734
|
+
|
|
2735
|
+ return 1;
|
|
2736
|
+}
|
|
2737
|
+
|
2701
|
2738
|
|
2702
|
2739
|
|
2703
|
2740
|
/* Scavenging */
|
... |
... |
@@ -2756,41 +2793,7 @@ scavenge(void *start_obj, long nwords) |
2756
|
2793
|
|| other_space_p(object)) {
|
2757
|
2794
|
words_scavenged = 1;
|
2758
|
2795
|
} else {
|
2759
|
|
- lispobj *ptr = (lispobj *) PTR(object);
|
2760
|
|
- words_scavenged = 1;
|
2761
|
|
- if (debug_static_array_p) {
|
2762
|
|
- fprintf(stderr, "Not in Lisp spaces: object = %p, ptr = %p\n",
|
2763
|
|
- (void*)object, ptr);
|
2764
|
|
- }
|
2765
|
|
-
|
2766
|
|
- if (1) {
|
2767
|
|
- lispobj header = *ptr;
|
2768
|
|
- if (debug_static_array_p) {
|
2769
|
|
- fprintf(stderr, " Header value = 0x%lx\n", (unsigned long) header);
|
2770
|
|
- }
|
2771
|
|
-
|
2772
|
|
- if (maybe_static_array_p(header)) {
|
2773
|
|
- int static_p;
|
2774
|
|
-
|
2775
|
|
- if (debug_static_array_p) {
|
2776
|
|
- fprintf(stderr, "Possible static vector at %p. header = 0x%lx\n",
|
2777
|
|
- ptr, (unsigned long) header);
|
2778
|
|
- }
|
2779
|
|
-
|
2780
|
|
- static_p = (HeaderValue(header) & 1) == 1;
|
2781
|
|
- if (static_p) {
|
2782
|
|
- /*
|
2783
|
|
- * We have a static vector. Mark it as
|
2784
|
|
- * reachable by setting the MSB of the header.
|
2785
|
|
- */
|
2786
|
|
- *ptr = header | 0x80000000;
|
2787
|
|
- if (debug_static_array_p) {
|
2788
|
|
- fprintf(stderr, "Scavenged static vector @%p, header = 0x%lx\n",
|
2789
|
|
- ptr, (unsigned long) header);
|
2790
|
|
- }
|
2791
|
|
- }
|
2792
|
|
- }
|
2793
|
|
- }
|
|
2796
|
+ words_scavenged = scav_static_vector(object);
|
2794
|
2797
|
}
|
2795
|
2798
|
} else if ((object & 3) == 0)
|
2796
|
2799
|
words_scavenged = 1;
|