Mercurial > hg > xemacs-beta
comparison src/alloc.c @ 195:a2f645c6b9f8 r20-3b24
Import from CVS: tag r20-3b24
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:59:05 +0200 |
parents | 3d6bfa290dbd |
children | e45d5e7c476e |
comparison
equal
deleted
inserted
replaced
194:2947057885e5 | 195:a2f645c6b9f8 |
---|---|
2622 } | 2622 } |
2623 else | 2623 else |
2624 { | 2624 { |
2625 int lost = (get_PURESIZE() - pureptr) / 1024; | 2625 int lost = (get_PURESIZE() - pureptr) / 1024; |
2626 char buf[200]; | 2626 char buf[200]; |
2627 extern Lisp_Object Vemacs_beta_version; | |
2628 int slop = NILP(Vemacs_beta_version) ? 512 : 4; | |
2627 | 2629 |
2628 sprintf (buf, "Purespace usage: %ld of %ld (%d%%", | 2630 sprintf (buf, "Purespace usage: %ld of %ld (%d%%", |
2629 pureptr, (long) get_PURESIZE(), | 2631 pureptr, (long) get_PURESIZE(), |
2630 (int) (pureptr / (get_PURESIZE() / 100.0) + 0.5)); | 2632 (int) (pureptr / (get_PURESIZE() / 100.0) + 0.5)); |
2631 if (lost > 2) { | 2633 if (lost > 2) { |
2632 sprintf (buf + strlen (buf), " -- %dk wasted", lost); | 2634 sprintf (buf + strlen (buf), " -- %dk wasted", lost); |
2633 if (die_if_pure_storage_exceeded) { | 2635 if (die_if_pure_storage_exceeded) { |
2634 puresize_adjust_h (pureptr + 16); | 2636 puresize_adjust_h (pureptr + slop); |
2635 rc = -1; | 2637 rc = -1; |
2636 } | 2638 } |
2637 } | 2639 } |
2638 | 2640 |
2639 strcat (buf, ")."); | 2641 strcat (buf, ")."); |