Re: Bss segment advantage.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



srimugunthan dhandapani wrote:
> Hi all,
> Can anybody explain what is the advantage of using a separate
> segment(Bss) for uninitialised variables and a seperate segment(data)
> for initialised variables.Why not have a single segment?
> 
> I learnt from the web that "The advantage in using the bss segment for
> storage that
> starts off empty is that the initialization information need
> not be stored in the output file."
> 
> But i dont understand to which output file they are talking about , and
> the initialisation information is written to.
> Can anybody explain it further ?

The .bss segment is not stored on disk, thus the executable requires
less disk space.  Whole page frames of the .bss can be mapped as
inaccessible, so they are populated with physical pages and zeroed on
the first access - this improves application startup and lowers physical
memory pressure.

~chill


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux