[erlang-questions] Erlang Memory Question

Eranga Udesh eranga.erl@REDACTED
Mon Sep 22 16:11:56 CEST 2014


Hi,

I'm trying to optimize my memory consumption in Erlang VM and to garbage
collect as soon as possible.

Let's say I have a large object, "X", After some processing, I only need to
work on small part of X, called "x".

Can someone advice me if below process flow will put the large object X in
to garbage collection, while waiting for the long running job to continue?

function1() ->

X = ... fetch a large object....

... some processing...

x = ... extract a part of X...
... long running job....


If it's not putting X into garbage collection, does below change do that?

function1() ->

X = ... fetch a large object....

... some processing...

x = ... extract a part of X...
function2(x).

function2(x) ->

... long running job...


Tks,
- Eranga
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140922/1e3445e1/attachment.htm>


More information about the erlang-questions mailing list