[erlang-questions] Unload unused modules

1 view
Skip to first unread message

Dmitry Belyaev

unread,
Nov 8, 2009, 2:42:29 AM11/8/09
to erlang-q...@erlang.org
Is there any way to unload unused module?

I've been testing how many modules can be loaded to erlang. I came up to
little less than 750 modules of 217.5 KB each. So beam.smp consumed 800
MB of memory.

Now I'm sure that some of the loaded modules will not be used at least
for a long time. How can I unload them?

Dmitry Belyaev


________________________________________________________________
erlang-questions mailing list. See http://www.erlang.org/faq.html
erlang-questions (at) erlang.org

Vlad Dumitrescu

unread,
Nov 8, 2009, 7:24:09 AM11/8/09
to Dmitry Belyaev, erlang-q...@erlang.org
Hi!

On Sun, Nov 8, 2009 at 08:42, Dmitry Belyaev <rumata...@nm.ru> wrote:
> Is there any way to unload unused module?
>
> I've been testing how many modules can be loaded to erlang. I came up to
> little less than 750 modules of 217.5 KB each. So beam.smp consumed 800
> MB of memory.
>
> Now I'm sure that some of the loaded modules will not be used at least
> for a long time. How can I unload them?

Yes, code:delete/1 and code:purge/1. If you know nobody uses tha code,
the latter will also clean up the memory.

regards,
Vlad

Dmitry Belyaev

unread,
Nov 8, 2009, 7:36:34 AM11/8/09
to Vlad Dumitrescu, erlang-q...@erlang.org
Thank you. I searched for "unload" but there is "remove" in docs.
Reply all
Reply to author
Forward
0 new messages