aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
authorPaul Eggert2011-05-30 09:47:35 -0700
committerPaul Eggert2011-05-30 09:47:35 -0700
commit531b01656f89e093b9fa35959fa41e534b025320 (patch)
tree190b5a279e0e8e0130b6ba070fa217ce1282e2f3 /src/xterm.c
parentde677ace77fa48962be80b668662a7009498e5d6 (diff)
downloademacs-531b01656f89e093b9fa35959fa41e534b025320.tar.gz
emacs-531b01656f89e093b9fa35959fa41e534b025320.zip
[ChangeLog]
Malloc failure behavior now depends on size of allocation. * lib/allocator.h (struct allocator.die): New size arg. * lib/careadlinkat.c (careadlinkat): Pass size to 'die' function. If the actual problem is an ssize_t limitation, not a size_t or malloc failure, fail with errno == ENAMETOOLONG instead of calling 'die'. [src/ChangeLog] Malloc failure behavior now depends on size of allocation. * alloc.c (buffer_memory_full, memory_full): New arg NBYTES. * lisp.h: Change signatures accordingly. * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c: All callers changed.
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 3b8112d972b..56d2ce0e9e5 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -4225,7 +4225,7 @@ x_send_scroll_bar_event (Lisp_Object window, int part, int portion, int whole)
4225 size_t old_nbytes = scroll_bar_windows_size * sizeof *scroll_bar_windows; 4225 size_t old_nbytes = scroll_bar_windows_size * sizeof *scroll_bar_windows;
4226 4226
4227 if ((size_t) -1 / sizeof *scroll_bar_windows < new_size) 4227 if ((size_t) -1 / sizeof *scroll_bar_windows < new_size)
4228 memory_full (); 4228 memory_full (SIZE_MAX);
4229 scroll_bar_windows = (struct window **) xrealloc (scroll_bar_windows, 4229 scroll_bar_windows = (struct window **) xrealloc (scroll_bar_windows,
4230 nbytes); 4230 nbytes);
4231 memset (&scroll_bar_windows[i], 0, nbytes - old_nbytes); 4231 memset (&scroll_bar_windows[i], 0, nbytes - old_nbytes);