BSS data segment
D. Chadwick Gibbons
chad at lakesys.UUCP
Sat Jul 22 21:49:50 AEST 1989
I've seen the BSS data segment mentioned in several books. Some
even have indepth sections describing how to create
efficently-initalizing programs by taking advantage of this feature.
However, I'm wondering if this is a C feature, or a phenonmenon of the
UNIX/MS-DOS environments. It's extremely convient to have a section of
code auto-initialized to zero by the run-time system...perhaps a large
amount of global pointers, such as:
char *ptr1, *ptr2, *ptr3.......*ptr999, *ptr1000;
main();
etc, etc. Things are thus auto-set to NULL, and the need for
initialization elsewhere does not exist. Handy, indeed.
--
D. Chadwick Gibbons, chad at lakesys.lakesys.com, ...!uunet!marque!lakesys!chad
More information about the Comp.lang.c
mailing list