linked-in drivers once again

Daniel Néri <>
Fri Jun 29 03:20:50 CEST 2001


"Vance Shipley" <> writes:

> I disagree:
> 
> $ cat > t.c
> main()
> {
>         int var;
> 
>         printf("var=%d\n", var);
> }

Yes, but that is *not* a static variable (you'd have prefix the
declaration with the keyword "static", or move it outside main).

Uninitialised static variables are traditionally allocated in a
section of memory called BSS (i.e. not on the stack or in a register
like "var" in the code above). This section is zeroed by the OS when
the executable is loaded into memory.


Regards,
   --Daniel

-- 
Daniel Neri




More information about the erlang-questions mailing list