Solved

how to preload a shared object

Posted on 2009-07-15
8
265 Views
Last Modified: 2013-12-15
the requirement is i have .so file  shared.so which linked with b.exe  i have not used any dlopen() to load it is just early run time loading, i heard if we preload this shared.so file

the execution will be improved ? so how to preload a shared.so file.
0
Comment
Question by:tittu
  • 4
  • 4
8 Comments
 
LVL 53

Expert Comment

by:Infinity08
ID: 24857908
If you add the name of the shared library file to the LD_PRELOAD environment variable, it will be pre-loaded when starting your application, ie. potentially overriding standard C library functions.
However, I'm not sure that's what you meant when you were talking about pre-loading.

Could you clarify what you mean by pre-loading, and where you heard that the "execution will be improved" ?
0
 

Author Comment

by:tittu
ID: 24859055
I think all the Standard applications use pre-loading concept in fact firefox will have its preloader,
gnome nautilus will have its own preloader.
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 24859998
The kind of preloader you're talking about is only useful if you start and stop your application frequently. Is that the case ?
The Firefox Preloader you mentioned, for example, would actually load most of firefox into memory whether you're running it or not, so that when you actually start it, it's faster. Personally, I think it's a bit silly ... If you want to avoid slow startup times, then just don't re-start it once it's started ... You achieve the exact same thing as when using the preloader.

If you want the same thing, then you can just write another application that loads the shared library in memory, and keep it running. When you start your main application, it should use the already loaded shared library, and might thus be slightly faster.
0
 

Author Comment

by:tittu
ID: 25366382
not useful comments not expertise
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 53

Expert Comment

by:Infinity08
ID: 25366441
What do you mean by that ?
0
 

Author Comment

by:tittu
ID: 25371597
I need the .so file should be loaded into memory so that the process/exe depends on the .so  start up time will be faster
0
 
LVL 53

Accepted Solution

by:
Infinity08 earned 500 total points
ID: 25371901
Yes. And that's what I explained in http:#24859998. Which part of it do you want clarification on ?
0
 

Author Closing Comment

by:tittu
ID: 31603643
i cant understand
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This article will show, step by step, how to integrate R code into a R Sweave document
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now