Mechanism for a computer program to load a library (or other binary) into memory at runtime. Allows retrieving addresses of functions and variables contained in the library, executing functions, accessing variables, and unloading library from memory.
Questions tagged [dynamic-loading]
378 questions
6
votes
3 answers
Max number of appdomains loaded in one process
Since dynamic assembly loading requires appdomain loading to enable killing the assembly with unloading related appdomain, is there a "max" number appdomains in a process to be loaded? I am thinking of a server based application that each user can…

ali_bahoo
- 4,732
- 6
- 41
- 63
6
votes
4 answers
What's the simplest way to write portable dynamically loadable libraries in C++?
I'm working on a project which has multiple similar code paths which I'd like to separate from the main project into plugins. The project must remain cross-platform compatible, and all of the dynamic library loading APIs I've looked into are…

jakogut
- 4,409
- 6
- 29
- 41
6
votes
1 answer
Is there a load leak if dlopen() is called from a dlopen'd library?
If my executable calls dlopen to load a library but neglects to call dlclose, the library will stay loaded until the process exits and the OS forces it to unload.
If I load a.so which loads b.so, then call dlclose on a.so, does the OS unload b.so as…

Kietz
- 1,186
- 11
- 19
6
votes
0 answers
Is it bad to enable Dead Code Stripping?
My iOS project uses dlsym to dynamically point to an optional C library. Optional as-in the project can run with our without it, it just adds features.
For background info: Detect and use optional external C library at runtime in Objective-C
The…

Nathan H
- 48,033
- 60
- 165
- 247
6
votes
6 answers
What are the advantages of loading DLLs dynamically?
Looking for the advantages of loading DLLs dynamically as opposed to letting your application load the DLLs by default.

James
- 80,725
- 18
- 167
- 237
6
votes
1 answer
Progress of loading external JS file
I'm not sure what this would be called to know what to search for, if this is a duplicate please link me :)
Is it possible in JavaScript in a browser, to load an external file (this bit is easy), but given that the external file could be rather…

Phill
- 18,398
- 7
- 62
- 102
6
votes
3 answers
Is it safe to call dlclose(NULL)?
I experience a crash when I pass a null pointer to dlclose.
Should I check for null before calling dlclose?
POSIX tells nothing about this:
http://pubs.opengroup.org/onlinepubs/7908799/xsh/dlclose.html
Is it undefined behaviour or a bug in dlclose…

Vanuan
- 31,770
- 10
- 98
- 102
5
votes
1 answer
Dynamic loading of Haskell abstract syntax expression
Can we use GHC API or something else to load not text source modules, but AST expressions, similar to haskell-src-exts Exp type? This way we could save time for code generation and parsing.

modular
- 1,099
- 9
- 22
5
votes
1 answer
Overlapping mappings for loaded ELF segments
I'd like to understand a detail of how the dynamic loader creates mappings for ELF segments.
Consider a tiny shared library linked with GNU ld. The program headers are:
Type Offset VirtAddr PhysAddr FileSiz MemSiz …

dyp
- 38,334
- 13
- 112
- 177
5
votes
2 answers
Configuration which allows to disable cloud stream?
I have a spring boot application which has two functionalities Http requests and kafka Messages handling. I want this application to run in mode which is enabled from application.yml i.e if the user wants to enable it only for http requests then…

Nischal Revooru
- 195
- 2
- 10
5
votes
1 answer
How to compile runtime-generated Angular8 code?
I'm creating Angular code at runtime, in particular, I use a SVG library in order to create a vector graphic that contains Angular code directives like (click)='myMethod()', which, in turn, call methods I've statically defined in the SVG-enclosing…

Jan B.
- 6,030
- 5
- 32
- 53
5
votes
0 answers
Dynamically load firebase config params for different environments
I am using firebase topic subscription to push notifications in my Electron app. As of now I am hardcoding all the config properties like authorization key, topic, senderId etc in my app. Is there any way I can access these params based on the…

Kshama Jain
- 111
- 1
- 8
5
votes
1 answer
Why is JDBC dynamically loaded instead of imported?
In JDBC, I only see examples using
Class.forName("com.mysql.jdbc.Driver", true, cl);
and haven't seen one using
import com.mysql.jdbc.Driver;
Is it because we want to let a driver package be dynamically provided at execution time, so can be known…

Tim
- 1
- 141
- 372
- 590
5
votes
0 answers
Dynamic loading, dynamic linking
I was reading the difference between dynamic loading and dynamic linking.
(Dynamic loading vs Dynamic linking.) From there I found this useful answer by Jeff Darcy combination of linking and loading
In the third type i.e, Dynamic loading, dynamic…

ppandey
- 311
- 2
- 3
- 9
5
votes
1 answer
Does static initialization (and/or other) code get run when dlopen'ing?
When you dlopen() a shared object, is there a mechanism for having code in that DLL execute without being called explicitly? Specifically, C++ static initialization code for globals/statics which the caller of dlopen() might not know about? I'm…

einpoklum
- 118,144
- 57
- 340
- 684