erlang最小系统支持从远端加载beam

参见这个 http://avindev.iteye.com/blog/100113

-hosts Hosts
Specifies the IP addresses for the hosts on which Erlang boot servers are running, see erl_boot_server(3). This flag is mandatory if the -loader inet flag is present.
The IP addresses must be given in the standard form (four decimal numbers separated by periods, for example "150.236.20.74". Hosts names are not acceptable, but a broadcast address (preferably limited to the local network) is.

-id Id
Specifies the identity of the Erlang runtime system. If it is run as a distributed node, Id must be identical to the name supplied together with the
-sname or -name flag.

-loader Loader
Specifies the method used by erl_prim_loader to load Erlang modules into the system. See erl_prim_loader(3). Two Loader methods are supported, efile and inet. efile means use the local file system, this is the default. inet means use a boot server on another machine, and the -id, -hosts and -setcookie flags must be specified as well. If Loader is something else, the user supplied Loader port program is started.


preload的模块:

struct {
char* name;
int size;
unsigned char* code;
} pre_loaded[] = {
{"otp_ring0", 512, preloaded_otp_ring0},
{"init", 19096, preloaded_init},
{"prim_inet", 25948, preloaded_prim_inet},
{"prim_file", 12264, preloaded_prim_file},
{"zlib", 4248, preloaded_zlib},
{"prim_zip", 8228, preloaded_prim_zip},
{"erl_prim_loader", 21616, preloaded_erl_prim_loader},
{"erlang", 7776, preloaded_erlang},
{0, 0, 0}
};

所以必须预加载这些基础模块以便进一步load所需的beam.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值