Haris writes:
> Hi,
>
> Trying to understand the source tree of C library I came with this questions:
> - /usr/src/lib/libc is the C library, but what is /usr/src/lib/libbc ?
> - I found several sources for malloc.c like /libc/port/gen/malloc.c,
> lib/libmalloc/common/malloc.c. Do you know the difference between malloc
> found in libc and malloc found in libmalloc? Which is preferrable?
> - Is it possible to build only the library's part of the source tree, i.e
> /usr/src/lib/libc?
>
>
> This message posted from opensolaris.org
> _______________________________________________
> opensolaris-code mailing list
> [email protected]
> http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
I can't answer all your questions. As far as the different malloc's go,
here an extract from the end of the malloc(3MALLOC) man page:
NOTES
Note that unlike malloc(3C), this package does not preserve
the contents of a block when it is freed, unless the M_KEEP
option of mallopt() is used.
Undocumented features of malloc(3C) have not been dupli-
cated.
Function prototypes for malloc(), realloc(), calloc(), and
free() are also defined in the <malloc.h> header for compa-
tibility with old applications. New applications should
include <stdlib.h> to access the prototypes for these func-
tions. Comparative Features of these malloc routines,
bsdmalloc(3MALLOC), and malloc(3C)
o These malloc routines are space-efficient but have
slower performance.
o The bsdmalloc(3MALLOC) routines afford better perfor-
mance but are space-inefficient.
o The standard, fully SCD-compliant malloc(3C) routines
are a trade-off between performance and space-
efficiency.
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code