• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 278
  • Last Modified:

how to preload a shared object

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
tittu
Asked:
tittu
  • 4
  • 4
1 Solution
 
Infinity08Commented:
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
 
tittuAuthor Commented:
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
 
Infinity08Commented:
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
tittuAuthor Commented:
not useful comments not expertise
0
 
Infinity08Commented:
What do you mean by that ?
0
 
tittuAuthor Commented:
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
 
Infinity08Commented:
Yes. And that's what I explained in http:#24859998. Which part of it do you want clarification on ?
0
 
tittuAuthor Commented:
i cant understand
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now