cfree(3) Library Functions Manual cfree(3) cfree - C (libc, -lc) #include /* SunOS 4 */ int cfree(void *ptr); /* glibc FreeBSD libcompat */ void cfree(void *ptr); /* In SCO OpenServer */ void cfree(unsigned int n, unsigned int size; char ptr[size * n], unsigned int n, unsigned int size); /* In Solaris watchmalloc.so.1 */ void cfree(size_t n, size_t size; void ptr[size * n], size_t n, size_t size); glibc (. feature_test_macros(7)): cfree(): glibc 2.19: _DEFAULT_SOURCE glibc 2.19 : _BSD_SOURCE || _SVID_SOURCE This function should never be used. Use free(3) instead. Starting with glibc 2.26, it has been removed from glibc. cfree 1 glibc cfree() free(3), " SunOS". . , . cfree 3 SCO Solaris malloc cfree() , calloc(3). -, #define cfree(p, n, s) free((p)) . A frequently asked question is "Can I use free(3) to free memory allocated with calloc(3), or do I need cfree()?". Answer: use free(3). An SCO manual writes: "The cfree routine is provided for compliance to the iBCSe2 standard and simply calls free. The n and size arguments to cfree are not used." cfree() SunOS ( free(3)) 1 0 - . errno EINVAL: ptr , malloc(3). attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |cfree() | | MT-Safe /* glibc */ | +----------------------------+----------------------------------------------------------+--------------------------+ cfree() , SCO, iBCSe2, Intel386 Binary Compatibility Specification, Edition 2. . Removed in glibc 2.26. malloc(3) () Azamat Hackimov , Dmitriy S. Seregin , Dmitry Bolkhovskikh , Katrin Kutepova , Yuri Kozlov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () . Linux man-pages 6.18 8 2026 . cfree(3)