User: aidan
Date: 05/12/25 12:21:48
Modified: xemacs/src ChangeLog alloc.c
Log:
Revert the alloc warning bugfix
Revision Changes Path
1.916 +9 -0 XEmacs/xemacs/src/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.915
retrieving revision 1.916
diff -u -p -r1.915 -r1.916
--- ChangeLog 2005/12/24 22:31:52 1.915
+++ ChangeLog 2005/12/25 11:21:45 1.916
@@ -1,3 +1,12 @@
+2005-12-25 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * alloc.c:
+ * alloc.c (malloc_warning):
+ * alloc.c (MALLOC_BEGIN):
+ * alloc.c (FREE_OR_REALLOC_BEGIN):
+ Revert the alloc warning bugfix, in response to Stephen's mail
+ 87acepzl6e.fsf(a)tleepslib.sk.tsukuba.ac.jp .
+
2005-12-24 Aidan Kehoe <kehoea(a)parhasard.net>
* objects-x.c (x_font_instance_truename):
1.122 +18 -28 XEmacs/xemacs/src/alloc.c
Index: alloc.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/alloc.c,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -p -r1.121 -r1.122
--- alloc.c 2005/12/24 19:06:05 1.121
+++ alloc.c 2005/12/25 11:21:46 1.122
@@ -231,6 +231,22 @@ release_breathing_space (void)
}
#endif /* not MC_ALLOC */
+/* malloc calls this if it finds we are near exhausting storage */
+void
+malloc_warning (const char *str)
+{
+ if (ignore_malloc_warnings)
+ return;
+
+ warn_when_safe
+ (Qmemory, Qemergency,
+ "%s\n"
+ "Killing some buffers may delay running out of memory.\n"
+ "However, certainly by the time you receive the 95%% warning,\n"
+ "you should clean up, kill this Emacs, and start a new one.",
+ str);
+}
+
/* Called if malloc returns zero */
DOESNT_RETURN
memory_full (void)
@@ -274,21 +290,18 @@ set_alloc_mins_and_maxes (void *val, Byt
}
#ifdef ERROR_CHECK_MALLOC
-static int in_malloc, in_malloc_warning;
+static int in_malloc;
extern int regex_malloc_disallowed;
#define MALLOC_BEGIN() \
do \
{ \
- assert (!in_malloc || in_malloc_warning); \
+ assert (!in_malloc); \
assert (!regex_malloc_disallowed); \
in_malloc = 1; \
} \
while (0)
-#define MALLOC_WARNING_BEGIN() (++in_malloc_warning)
-#define MALLOC_WARNING_END() (--in_malloc_warning)
-
#ifdef MC_ALLOC
#define FREE_OR_REALLOC_BEGIN(block) \
do \
@@ -328,33 +341,10 @@ while (0)
#else /* ERROR_CHECK_MALLOC */
#define MALLOC_BEGIN()
-#define MALLOC_WARNING_BEGIN()
-#define MALLOC_WARNING_END()
#define FREE_OR_REALLOC_BEGIN(block)
#define MALLOC_END()
#endif /* ERROR_CHECK_MALLOC */
-
-/* malloc calls this if it finds we are near exhausting storage */
-void
-malloc_warning (const char *str)
-{
- if (ignore_malloc_warnings)
- return;
-
- MALLOC_WARNING_BEGIN();
-
- warn_when_safe
- (Qmemory, Qemergency,
- "%s\n"
- "Killing some buffers may delay running out of memory.\n"
- "However, certainly by the time you receive the 95%% warning,\n"
- "you should clean up, kill this Emacs, and start a new one.\n"
- "On Unix, look into your resource limits; ulimit -d, especially.",
- str);
-
- MALLOC_WARNING_END();
-}
static void
malloc_after (void *val, Bytecount size)
Show replies by date