- 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_constants.nbytes;
- purestat_vector_other.nobjects =
- purestat_vector_all.nobjects -
- purestat_vector_constants.nobjects;
-
- purestat_string_other.nbytes =
- purestat_string_all.nbytes -
- (purestat_string_pname.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_interactive.nobjects +
- purestat_string_documentation.nobjects +
-#ifdef I18N3
- purestat_string_domain.nobjects +
-#endif
- purestat_string_other_function.nobjects);
-
- message (" %-34s Objects Bytes", "");
-
- print_purestat (&purestat_cons);
- print_purestat (&purestat_float);
- print_purestat (&purestat_string_pname);
- print_purestat (&purestat_function);
- print_purestat (&purestat_opaque_instructions);
- print_purestat (&purestat_vector_constants);
- print_purestat (&purestat_string_interactive);
-#ifdef I18N3
- print_purestat (&purestat_string_domain);
-#endif
- print_purestat (&purestat_string_documentation);
- print_purestat (&purestat_string_other_function);
- print_purestat (&purestat_vector_other);
- print_purestat (&purestat_string_other);
- print_purestat (&purestat_string_all);
- print_purestat (&purestat_vector_all);
-
-#endif /* PURESTAT */
-
-
- if (report_impurities)
- {
- Lisp_Object plist;
- struct gcpro gcpro1;
- plist = XCAR (XCDR (XCDR (XCDR (XCDR (XCDR (Fgarbage_collect()))))));
- GCPRO1 (plist);
- message ("\nImpurities:");
- for (; CONSP (plist); plist = XCDR (XCDR (plist)))
- {
- Lisp_Object symbol = XCAR (plist);
- int size = XINT (XCAR (XCDR (plist)));
- if (size > 0)
- {
- char buf [100];
- char *s = buf;
- memcpy (buf,
- string_data (XSYMBOL (symbol)->name),
- string_length (XSYMBOL (symbol)->name) + 1);
- while (*s++) if (*s == '-') *s = ' ';
- *(s-1) = ':'; *s = 0;
- message (" %-34s %6d", buf, size);
- }
- }
- UNGCPRO;
- garbage_collect_1 (); /* collect Fgarbage_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");
- }