[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 03/13] allocator: allow reasons other than size overflow
From: |
Paul Eggert |
Subject: |
[PATCH 03/13] allocator: allow reasons other than size overflow |
Date: |
Sun, 4 Jun 2017 23:45:53 -0700 |
* lib/allocator.h: Adjust comment to allow reasons other
than size overflow to result in SIZE_MAX.
---
ChangeLog | 4 ++++
lib/allocator.h | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2f99ccc..5aae016 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2017-06-04 Paul Eggert <address@hidden>
+ allocator: allow reasons other than size overflow
+ * lib/allocator.h: Adjust comment to allow reasons other
+ than size overflow to result in SIZE_MAX.
+
xwalloc, xwalloc-die, xwallocator: new modules
* lib/xwalloc-die.c, lib/xwalloc.c, lib/xwalloc.h, lib/xwallocator.c:
* modules/xwalloc, modules/xwalloc-die, modules/xwalloc-tests:
diff --git a/lib/allocator.h b/lib/allocator.h
index 650f8e0..9f4c30f 100644
--- a/lib/allocator.h
+++ b/lib/allocator.h
@@ -47,8 +47,8 @@ struct allocator
/* If nonnull, call DIE (SIZE) if MALLOC (SIZE) or REALLOC (...,
SIZE) fails. DIE should not return. SIZE should equal SIZE_MAX
- if size_t overflow was detected while calculating sizes to be
- passed to MALLOC or REALLOC. */
+ if the size is unknown, e.g., if size_t overflow was detected
+ while calculating sizes to be passed to MALLOC or REALLOC. */
void (*die) (size_t);
};
--
2.9.4
- [PATCH 08/13] getgroups: use walloc, (continued)
- [PATCH 08/13] getgroups: use walloc, Paul Eggert, 2017/06/05
- [PATCH 06/13] acl-permissions: use walloc, Paul Eggert, 2017/06/05
- [PATCH 09/13] group-member: use walloc, Paul Eggert, 2017/06/05
- [PATCH 10/13] propername: use xwalloc rather than xalloc, Paul Eggert, 2017/06/05
- [PATCH 07/13] exclude: use xwalloc instead of xalloc, Paul Eggert, 2017/06/05
- [PATCH 13/13] xstriconv: use xwalloc rather than xalloc, Paul Eggert, 2017/06/05
- [PATCH 02/13] xwalloc, xwalloc-die, xwallocator: new modules, Paul Eggert, 2017/06/05
- [PATCH 11/13] quotearg: use xwalloc rather than xalloc, Paul Eggert, 2017/06/05
- [PATCH 04/13] careadlinkat: use walloc, Paul Eggert, 2017/06/05
- [PATCH 05/13] dfa: use xwalloc instead of xalloc, Paul Eggert, 2017/06/05
- [PATCH 03/13] allocator: allow reasons other than size overflow,
Paul Eggert <=
- [PATCH 12/13] trim: use xwalloc rather than xalloc, Paul Eggert, 2017/06/05