Does anyone know the story behind the count parameter in libc's calloc()?
Posted Aug 11, 2005 22:17 UTC (Thu) by brettlevin (guest, #29117)
In 4.1BSD the args to malloc and calloc were unsigned ints. There were at least some machines who had 16-bit ints, but which had more than 2^16 worth of addressable memory. In such an environment it might be useful to allocate more than 64Kb in one call.
Then POSIX changed these args to size_t, easing the size restriction.
Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds