Solved

how to preload a shared object

Posted on 2009-07-15
8
266 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A short article about problems I had with the new location API and permissions in Marshmallow
Fine Tune your automatic Updates for Ubuntu / Debian
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

943 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

4 Experts available now in Live!

Get 1:1 Help Now