blob: 6b3d2b5a1fb0d06767b44dc9f1b7d5190b0eaa07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
[;1m-spec load_module(Module, Binary) -> {module, Module} | {error, Reason}[0m
[;1m when[0m
[;1m Module :: module(),[0m
[;1m Binary :: binary(),[0m
[;1m Reason :: badfile | not_purged | on_load.[0m
If [;;4mBinary[0m contains the object code for module [;;4mModule[0m, this BIF
loads that object code. If the code for module [;;4mModule[0m already
exists, all export references are replaced so they point to the
newly loaded code. The previously loaded code is kept in the
system as old code, as there can still be processes executing that
code.
Returns either [;;4m{module, Module}[0m, or [;;4m{error, Reason}[0m if loading
fails. [;;4mReason[0m is one of the following:
[;;4m[;;4mbadfile[0m[0m:
The object code in [;;4mBinary[0m has an incorrect format or the
object code contains code for another module than [;;4mModule[0m.
[;;4m[;;4mnot_purged[0m[0m:
[;;4mBinary[0m contains a module that cannot be loaded because old
code for this module already exists.
Warning:
This BIF is intended for the code server (see [;;4mcode(3)[0m) and
is not to be used elsewhere.
|