diff options
| author | Paul Eggert | 2011-05-30 09:47:35 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-05-30 09:47:35 -0700 |
| commit | 531b01656f89e093b9fa35959fa41e534b025320 (patch) | |
| tree | 190b5a279e0e8e0130b6ba070fa217ce1282e2f3 /src/menu.c | |
| parent | de677ace77fa48962be80b668662a7009498e5d6 (diff) | |
| download | emacs-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/menu.c')
| -rw-r--r-- | src/menu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/menu.c b/src/menu.c index e4338f349f6..7eda4c6ebb5 100644 --- a/src/menu.c +++ b/src/menu.c | |||
| @@ -178,7 +178,7 @@ static void | |||
| 178 | grow_menu_items (void) | 178 | grow_menu_items (void) |
| 179 | { | 179 | { |
| 180 | if ((INT_MAX - MENU_ITEMS_PANE_LENGTH) / 2 < menu_items_allocated) | 180 | if ((INT_MAX - MENU_ITEMS_PANE_LENGTH) / 2 < menu_items_allocated) |
| 181 | memory_full (); | 181 | memory_full (SIZE_MAX); |
| 182 | menu_items_allocated *= 2; | 182 | menu_items_allocated *= 2; |
| 183 | menu_items = larger_vector (menu_items, menu_items_allocated, Qnil); | 183 | menu_items = larger_vector (menu_items, menu_items_allocated, Qnil); |
| 184 | } | 184 | } |