Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7780419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:53:31+00:00 2026-06-01T18:53:31+00:00

When I run a program (in linux) does it all get loaded into the

  • 0

When I run a program (in linux) does it all get loaded into the physical memory? If so, is using shared libraries, instead of static libraries, help in terms of caching? In general, when should I use shared libraries and when should I use static libraries? My codes are either written in C or in C++ if that matters.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T18:53:33+00:00Added an answer on June 1, 2026 at 6:53 pm

    This article hits covers some decent ground on what you want. This article goes much deeper about the advantages of shared libraries

    SO also has covered this topic in depth

    Difference between static and shared libraries?

    When to use dynamic vs. static libraries

    Almost all the above mentioned articles are shared library biased. Wikipedia tries to rescue static libraries 🙂

    From wiki,

    There are several advantages to statically linking libraries with an
    executable instead of dynamically linking them. The most significant
    is that the application can be certain that all its libraries are
    present and that they are the correct version. This avoids dependency
    problems. Usually, static linking will result in a significant
    performance improvement.

    Static linking can also allow the application
    to be contained in a single executable file, simplifying distribution
    and installation.

    With static linking, it is enough to include those
    parts of the library that are directly and indirectly referenced by
    the target executable (or target library).

    With dynamic libraries, the
    entire library is loaded, as it is not known in advance which
    functions will be invoked by applications. Whether this advantage is
    significant in practice depends on the structure of the library.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote a program for linux using libxml2 for html parsing. Although it does
Why does the program listed below run on mac osx and linux but not
In Linux I would like to run a program but only for a limited
How to run a program and know its PID in Linux? If I have
To run a program with custom env settings, we do this on Linux $
I am compiling my program that will run on linux gcc 4.4.1 C99. I
I'm writing a program to be run from the Linux user space which spawns
I'm using Stroustrup's swan book. I have run into a problem getting output from
In my Linux system I'm writing a program that dynamically loads some .so libraries
When I run my program I get the message Killed with some information about

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.