diff options
| author | Paul Eggert | 2011-06-02 01:22:57 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-02 01:22:57 -0700 |
| commit | f797625a8ca7bc973b6943c6fce97f1e479a283d (patch) | |
| tree | ea83bdbb5c3ef83b9142acbcf08776e386c85108 /lib/allocator.h | |
| parent | 4008751468313f68b74ae3f1f1d3857e52f0062f (diff) | |
| download | emacs-f797625a8ca7bc973b6943c6fce97f1e479a283d.tar.gz emacs-f797625a8ca7bc973b6943c6fce97f1e479a283d.zip | |
* lib/allocator.h, lib/careadlinkat.c: Merge from gnulib.
Diffstat (limited to 'lib/allocator.h')
| -rw-r--r-- | lib/allocator.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/allocator.h b/lib/allocator.h index 953117da83f..b8de95c0f50 100644 --- a/lib/allocator.h +++ b/lib/allocator.h | |||
| @@ -45,10 +45,11 @@ struct allocator | |||
| 45 | /* Call FREE to free memory, like 'free'. */ | 45 | /* Call FREE to free memory, like 'free'. */ |
| 46 | void (*free) (void *); | 46 | void (*free) (void *); |
| 47 | 47 | ||
| 48 | /* If nonnull, call DIE if MALLOC or REALLOC fails. DIE should not | 48 | /* If nonnull, call DIE (SIZE) if MALLOC (SIZE) or REALLOC (..., |
| 49 | return. DIE can be used by code that detects memory overflow | 49 | SIZE) fails. DIE should not return. SIZE should equal SIZE_MAX |
| 50 | while calculating sizes to be passed to MALLOC or REALLOC. */ | 50 | if size_t overflow was detected while calculating sizes to be |
| 51 | void (*die) (void); | 51 | passed to MALLOC or REALLOC. */ |
| 52 | void (*die) (size_t); | ||
| 52 | }; | 53 | }; |
| 53 | 54 | ||
| 54 | /* An allocator using the stdlib functions and a null DIE function. */ | 55 | /* An allocator using the stdlib functions and a null DIE function. */ |