... |
... |
@@ -5411,17 +5411,23 @@ scan_weak_pointers(void) |
5411
|
5411
|
max_vectors++;
|
5412
|
5412
|
}
|
5413
|
5413
|
|
|
5414
|
+ printf("weak pointer count = %d\n", max_vectors);
|
|
5415
|
+
|
|
5416
|
+ /* Nothing to do if there are no weak pointers */
|
|
5417
|
+ if (max_vectors == 0) {
|
|
5418
|
+ return;
|
|
5419
|
+ }
|
|
5420
|
+
|
5414
|
5421
|
/*
|
5415
|
5422
|
* Allocate max space
|
5416
|
5423
|
*/
|
5417
|
5424
|
vectors_to_free = (lispobj*) malloc(max_vectors * sizeof(lispobj));
|
5418
|
5425
|
gc_assert(vectors_to_free);
|
5419
|
5426
|
|
5420
|
|
- printf("weak pointer count = %d\n", max_vectors);
|
5421
|
5427
|
printf("vectors_to_free = %p\n", vectors_to_free);
|
5422
|
5428
|
|
5423
|
5429
|
/*
|
5424
|
|
- * Now process the weak pointers
|
|
5430
|
+ * Now process the weak pointers.
|
5425
|
5431
|
*/
|
5426
|
5432
|
for (wp = weak_pointers; wp; wp = wp->next) {
|
5427
|
5433
|
lispobj value = wp->value;
|
... |
... |
@@ -5440,16 +5446,14 @@ scan_weak_pointers(void) |
5440
|
5446
|
/* The value may be a static vector */
|
5441
|
5447
|
lispobj *header = (lispobj *) PTR(value);
|
5442
|
5448
|
|
|
5449
|
+ printf("value %p, header = %p\n", (lispobj*) value, header);
|
|
5450
|
+
|
5443
|
5451
|
if (maybe_static_array_p(*header)) {
|
5444
|
5452
|
if (HeaderValue(*header) == 1) {
|
5445
|
5453
|
/*
|
5446
|
5454
|
* We have a static array with the mark
|
5447
|
5455
|
* cleared which means it's not used.
|
5448
|
|
- */
|
5449
|
|
- printf(" vectors_to_free[%d] = %p %08lx\n",
|
5450
|
|
- k, (lispobj *) value, *header);
|
5451
|
|
-
|
5452
|
|
- /*
|
|
5456
|
+ *
|
5453
|
5457
|
* Only add it if we don't already have it.
|
5454
|
5458
|
*/
|
5455
|
5459
|
int m;
|