X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fallocator.h;h=b8de95c0f50c8d79dbb466ff0ea5e24a3e87b58e;hb=fb6aa6ad7dd950729f4e3349d89d4ad82761af61;hp=953117da83f55609da58fffef4c6b012909bfa89;hpb=18ce6fa97033a8f8a9a50750adbd1ce45401cd61;p=gnulib.git diff --git a/lib/allocator.h b/lib/allocator.h index 953117da8..b8de95c0f 100644 --- a/lib/allocator.h +++ b/lib/allocator.h @@ -45,10 +45,11 @@ struct allocator /* Call FREE to free memory, like 'free'. */ void (*free) (void *); - /* If nonnull, call DIE if MALLOC or REALLOC fails. DIE should not - return. DIE can be used by code that detects memory overflow - while calculating sizes to be passed to MALLOC or REALLOC. */ - void (*die) (void); + /* 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. */ + void (*die) (size_t); }; /* An allocator using the stdlib functions and a null DIE function. */