X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fpagealign_alloc.h;h=37aab5f77b78b2dd69c23a4020fc46f130a90db8;hb=4f5d6947d90a65c2b577ef2ca7adf4e413cfe6b6;hp=2d63eb15f21100f540eef3aacc9b035122db1b36;hpb=c49424557579cb46914ba4f080720d8b94abab39;p=gnulib.git diff --git a/lib/pagealign_alloc.h b/lib/pagealign_alloc.h index 2d63eb15f..37aab5f77 100644 --- a/lib/pagealign_alloc.h +++ b/lib/pagealign_alloc.h @@ -26,12 +26,17 @@ boundary. If SIZE is not a multiple of the system page size, it will be rounded up to the next multiple. - Return a pointer to the start of the memory block, or NULL if the allocation - failed. */ + Return a pointer to the start of the memory block. Upon allocation failure, + return NULL and set errno. */ extern void *pagealign_alloc (size_t size); +/* Like pagealign_alloc, except it exits the program if the allocation + fails. */ +extern void *pagealign_xalloc (size_t size); + /* Free a memory block. - PTR must be a pointer returned by pagealign_alloc. */ + PTR must be a non-NULL pointer returned by pagealign_alloc or + pagealign_xalloc. */ extern void pagealign_free (void *ptr); #endif /* _PAGEALIGN_ALLOC_H */