[TUHS] About the history of cfree()

Jukka Ruohonen jruohonen at iki.fi
Thu Jun 25 00:39:20 AEST 2020


Hello,

does anyone remember details on how the cfree() function ended to <stdlib.h>
of various systems? 

>From the only available documentation I could easily find [1], I'd reckon it
came from SCO's malloc implementation that tried to conform to Intel's i386
iBCS. But almost all other systems wrapped it to free().  Interestingly, it
seems that also SunOS 4.0 (1988) used the free()-wrapper.  So was the
3-parameter cfree() only used in SCO XENIX 386 (1987) and the like [2]?

Anyways, a small but interesting detail, and I suppose a good example on the
developments that led to ANSI C.

- Jukka

[1] https://man7.org/linux/man-pages/man3/cfree.3.html
[2] https://www.landley.net/history/mirror/unix/scohistory.html


More information about the TUHS mailing list