comparison src/sheap.c @ 771:943eaba38521

[xemacs-hg @ 2002-03-13 08:51:24 by ben] The big ben-mule-21-5 check-in! Various files were added and deleted. See CHANGES-ben-mule. There are still some test suite failures. No crashes, though. Many of the failures have to do with problems in the test suite itself rather than in the actual code. I'll be addressing these in the next day or so -- none of the test suite failures are at all critical. Meanwhile I'll be trying to address the biggest issues -- i.e. build or run failures, which will almost certainly happen on various platforms. All comments should be sent to ben@xemacs.org -- use a Cc: if necessary when sending to mailing lists. There will be pre- and post- tags, something like pre-ben-mule-21-5-merge-in, and post-ben-mule-21-5-merge-in.
author ben
date Wed, 13 Mar 2002 08:54:06 +0000
parents fdefd0186b75
children 2b6fa2618f76
comparison
equal deleted inserted replaced
770:336a418893b5 771:943eaba38521
18 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 18 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 02111-1307, USA.*/ 19 02111-1307, USA.*/
20 20
21 #include <config.h> 21 #include <config.h>
22 #include "lisp.h" 22 #include "lisp.h"
23
24 #include "sysfile.h"
23 25
24 #include <unistd.h> 26 #include <unistd.h>
25 #include <sheap-adjust.h> 27 #include <sheap-adjust.h>
26 28
27 #define STATIC_HEAP_BASE 0x800000 29 #define STATIC_HEAP_BASE 0x800000
104 } 106 }
105 107
106 static void 108 static void
107 sheap_adjust_h () 109 sheap_adjust_h ()
108 { 110 {
109 FILE *stream = fopen ("sheap-adjust.h", "w"); 111 FILE *stream = retry_fopen ("sheap-adjust.h", "w");
110 112
111 if (stream == NULL) 113 if (stream == NULL)
112 report_file_error ("Opening sheap adjustment file", 114 report_file_error ("Opening sheap adjustment file",
113 build_string ("sheap-adjust.h")); 115 build_string ("sheap-adjust.h"));
114 116
115 fprintf (stream, 117 fprintf (stream,
116 "/*\tDo not edit this file!\n" 118 "/*\tDo not edit this file!\n"
117 "\tAutomatically generated by XEmacs */\n" 119 "\tAutomatically generated by XEmacs */\n"
118 "# define SHEAP_ADJUSTMENT (%d)\n", 120 "# define SHEAP_ADJUSTMENT (%d)\n",
119 ((static_heap_ptr - static_heap_buffer) - STATIC_HEAP_BASE)); 121 ((static_heap_ptr - static_heap_buffer) - STATIC_HEAP_BASE));
120 fclose (stream); 122 retry_fclose (stream);
121 } 123 }
122 124
123 void report_sheap_usage (int die_if_pure_storage_exceeded); 125 void report_sheap_usage (int die_if_pure_storage_exceeded);
124 void 126 void
125 report_sheap_usage (int die_if_pure_storage_exceeded) 127 report_sheap_usage (int die_if_pure_storage_exceeded)