[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r104513: * alloc.c: Simplify handling
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r104513: * alloc.c: Simplify handling of large-request failures (Bug#8800). |
Date: |
Mon, 06 Jun 2011 09:41:21 -0700 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 104513
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Mon 2011-06-06 09:41:21 -0700
message:
* alloc.c: Simplify handling of large-request failures (Bug#8800).
(SPARE_MEMORY): Always define.
(LARGE_REQUEST): Remove.
(memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
modified:
src/ChangeLog
src/alloc.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2011-06-06 13:57:49 +0000
+++ b/src/ChangeLog 2011-06-06 16:41:21 +0000
@@ -1,3 +1,10 @@
+2011-06-06 Paul Eggert <address@hidden>
+
+ * alloc.c: Simplify handling of large-request failures (Bug#8800).
+ (SPARE_MEMORY): Always define.
+ (LARGE_REQUEST): Remove.
+ (memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
+
2011-06-06 Martin Rudalics <address@hidden>
* lisp.h: Move EXFUNS for Fframe_root_window,
=== modified file 'src/alloc.c'
--- a/src/alloc.c 2011-06-06 04:54:23 +0000
+++ b/src/alloc.c 2011-06-06 16:41:21 +0000
@@ -190,17 +190,10 @@
static char *spare_memory[7];
-#ifndef SYSTEM_MALLOC
-/* Amount of spare memory to keep in large reserve block. */
+/* Amount of spare memory to keep in large reserve block, or to see
+ whether this much is available when malloc fails on a larger request. */
#define SPARE_MEMORY (1 << 14)
-#endif
-
-#ifdef SYSTEM_MALLOC
-# define LARGE_REQUEST (1 << 14)
-#else
-# define LARGE_REQUEST SPARE_MEMORY
-#endif
/* Number of extra blocks malloc should get when it needs more core. */
@@ -3289,9 +3282,9 @@
{
/* Do not go into hysterics merely because a large request failed. */
int enough_free_memory = 0;
- if (LARGE_REQUEST < nbytes)
+ if (SPARE_MEMORY < nbytes)
{
- void *p = malloc (LARGE_REQUEST);
+ void *p = malloc (SPARE_MEMORY);
if (p)
{
free (p);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r104513: * alloc.c: Simplify handling of large-request failures (Bug#8800).,
Paul Eggert <=