Library (computing): Difference between revisions

Content deleted Content added
Emperorbma (talk | contribs)
fmt
Static linking: dynamic linking takes the same amount of memory; it's just shared amongst executables.
Line 12:
'''Static linking''' is linking in which a library is embedded into the program executable at [[compile time]] by a [[linker]]. A linker is a separate utility which takes one or more libraries and [[object file]]s (which are previously generated by a compiler or an assembler) and produces an actual [[executable file]].
 
One of the biggest disadvantages of static linking is that each executable ends up containing its own copy of the resultinglibrary. executable fileWhen becomesmany largerstatically andlinked thereforeprograms consumesusing the same library are simultaneously executed on the same machine, a largergreat amountdeal of systemmemory resourcescan andbe takeswasted, longeras each execution loads its own copy of the tolibrary's loaddata into memory.
 
Examples of libraries which are traditionally designed to be statically linked include the [[ANSI C standard library]] and the [[ALIB assembler library]]. Static linked libraries predate Fortran; Fortran's I/O was designed to use a preexisting package of I/O routines.