+ int rc = 0;
+
+ if (pure_lossage)
+ {
+ message ("\n****\tPure Lisp storage exhausted!\n"
+ "\tPurespace usage: %ld of %ld\n"
+ "****",
+ (long) get_PURESIZE() + pure_lossage,
+ (long) get_PURESIZE());
+ if (die_if_pure_storage_exceeded)
+ {
+ puresize_adjust_h (get_PURESIZE() + pure_lossage);
+#ifdef HEAP_IN_DATA
+ sheap_adjust_h();
+#endif
+ rc = -1;
+ }
+ }
+ else
+ {
+ size_t lost = (get_PURESIZE() - pure_bytes_used) / 1024;
+ char buf[200];
+ /* extern Lisp_Object Vemacs_beta_version; */
+ /* This used to be NILP(Vemacs_beta_version) ? 512 : 4; */
+#ifndef PURESIZE_SLOP
+#define PURESIZE_SLOP 0
+#endif
+ size_t slop = PURESIZE_SLOP;
+
+ sprintf (buf, "Purespace usage: %ld of %ld (%d%%",
+ (long) pure_bytes_used,
+ (long) get_PURESIZE(),
+ (int) (pure_bytes_used / (get_PURESIZE() / 100.0) + 0.5));
+ if (lost > ((slop ? slop : 1) / 1024)) {
+ sprintf (buf + strlen (buf), " -- %ldk wasted", (long)lost);
+ if (die_if_pure_storage_exceeded) {
+ puresize_adjust_h (pure_bytes_used + slop);
+#ifdef HEAP_IN_DATA
+ sheap_adjust_h();
+#endif
+ rc = -1;
+ }
+ }
+
+ strcat (buf, ").");
+ message ("%s", buf);
+ }
+
+#ifdef PURESTAT
+
+ purestat_vector_other.nbytes =
+ purestat_vector_all.nbytes -
+ purestat_vector_bytecode_constants.nbytes;
+ purestat_vector_other.nobjects =
+ purestat_vector_all.nobjects -
+ purestat_vector_bytecode_constants.nobjects;
+
+ purestat_string_other.nbytes =
+ purestat_string_all.nbytes -
+ (purestat_string_pname.nbytes +
+ purestat_string_bytecodes.nbytes +
+ purestat_string_interactive.nbytes +
+ purestat_string_documentation.nbytes +
+#ifdef I18N3
+ purestat_string_domain.nbytes +
+#endif
+ purestat_string_other_function.nbytes);
+
+ purestat_string_other.nobjects =
+ purestat_string_all.nobjects -
+ (purestat_string_pname.nobjects +
+ purestat_string_bytecodes.nobjects +
+ purestat_string_interactive.nobjects +
+ purestat_string_documentation.nobjects +
+#ifdef I18N3
+ purestat_string_domain.nobjects +
+#endif
+ purestat_string_other_function.nobjects);
+
+ message (" %-26s Total Bytes", "");
+
+ {
+ int j;
+
+ for (j = 0; j < countof (purestats); j++)
+ if (!purestats[j])
+ clear_message ();
+ else
+ {
+ char buf [100];
+ sprintf(buf, "%s:", purestats[j]->name);
+ message (" %-26s %5d %7d %2d%%",
+ buf,
+ purestats[j]->nobjects,
+ purestats[j]->nbytes,
+ (int) (purestats[j]->nbytes / (pure_bytes_used / 100.0) + 0.5));
+ }
+ }
+#endif /* PURESTAT */
+
+
+ if (report_impurities)
+ {
+ Lisp_Object tem = Felt (Fgarbage_collect (), make_int (5));
+ struct gcpro gcpro1;
+ GCPRO1 (tem);
+ message ("\nImpurities:");
+ while (!NILP (tem))
+ {
+ if (CONSP (tem) && SYMBOLP (Fcar (tem)) && CONSP (Fcdr (tem)))
+ {
+ int total = XINT (Fcar (Fcdr (tem)));
+ if (total > 0)
+ {
+ char buf [100];
+ char *s = buf;
+ memcpy (buf, string_data (XSYMBOL (Fcar (tem))->name),
+ string_length (XSYMBOL (Fcar (tem))->name) + 1);
+ while (*s++) if (*s == '-') *s = ' ';
+ s--; *s++ = ':'; *s = 0;
+ message (" %-33s %6d", buf, total);
+ }
+ tem = Fcdr (Fcdr (tem));
+ }
+ else /* WTF?! */
+ {
+ Fprin1 (tem, Qexternal_debugging_output);
+ tem = Qnil;
+ }
+ }
+ UNGCPRO;
+ garbage_collect_1 (); /* GC garbage_collect's garbage */
+ }
+ clear_message ();
+
+ if (rc < 0) {
+ unlink("SATISFIED");
+ fatal ("Pure size adjusted, Don't Panic! I will restart the `make'");
+ } else if (pure_lossage && die_if_pure_storage_exceeded) {
+ fatal ("Pure storage exhausted");
+ }