<div dir="ltr">I forgot to reply to the list.<br><div><div><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">satoshi kinoshita</b> <span dir="ltr"><<a href="mailto:kino@cloudian.com">kino@cloudian.com</a>></span><br>
Date: Mon, Feb 24, 2014 at 10:53 AM<br>Subject: Re: [erlang-questions] process_info<br>To: Sverker Eriksson <<a href="mailto:sverker.eriksson@ericsson.com">sverker.eriksson@ericsson.com</a>><br><br><br><div dir="ltr">
<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Feb 21, 2014 at 8:00 PM, Sverker Eriksson <span dir="ltr"><<a href="mailto:sverker.eriksson@ericsson.com" target="_blank">sverker.eriksson@ericsson.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>A process has two heaps, one "old" heap
with long lived data and a "new" heap with more recently created
data.<br>
<br>
'heap_size' shows only the size of the new heap.<br>
Newer releases (my git repo goes back to R13B03) contain<br>
a 'total_heap_size' that also include the old heap.<br>
<br>
/Sverker, Erlang/OTP<br>
<br></div></div></blockquote><div><br></div><div>Thanks. I checked the same process running on R15B<br>and confirmed that total_heap_size is matching very good with 'memory' size.<br></div><div><br></div><div>
thank you very much,<br></div><div>kinoshita<br></div><div><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000"><div>
On 02/21/2014 07:14 AM, satoshi kinoshita wrote:<br>
</div>
<blockquote type="cite">
<pre>Hi,
I have a question about process_info().
For process <0,477,0> below,
heap_size is 6765 words,
stack_size is 12 words and
memory is 40,149,752 bytes.
Erlang doc says 'memory' includes stack, heap and internal structures.
In this case, stack + heap is 4*(6765+12)=27,108 bytes.
Does this mean most of memory usage(about 40M bytes) are used
for "internal structures"?
What is "internal structures"???
(I'm still using R11B-5 and I don't know it's specific to R11B-5 or not.)
Thanks in advance,
Kinoshita
-------------------------------------------------------
(hss1@excast01)3> process_info(pid(0,477,0)).
[{registered_name,mgs_db_mgse},
{current_function,{gen_server,loop,6}},
{initial_call,{proc_lib,init_p,5}},
{status,waiting},
{message_queue_len,0},
{messages,[]},
{links,[<0.436.0>]},
{dictionary,[{'$ancestors',[mgs_db_sup,<0.435.0>]},
{'$initial_call',{gen,init_it,
[gen_server,
<0.436.0>,
<0.436.0>,
{local,mgs_db_mgse},
mgs_db_mgse,
[60,0,"mgsen-i+up"],
[]]}}]},
{trap_exit,false},
{error_handler,error_handler},
{priority,normal},
{group_leader,<0.434.0>},
{heap_size,6765},
{stack_size,12},
{reductions,237536590},
{garbage_collection,[{fullsweep_after,65535}]}]
(hss1@excast01)4> process_info(pid(0,477,0),memory).
{memory,40149752}
---<a href="http://www.erlang.org/documentation/doc-5.5.5/lib/kernel-2.11.5/doc/html/erlang.html--------------" target="_blank">http://www.erlang.org/documentation/doc-5.5.5/lib/kernel-2.11.5/doc/html/erlang.html--------------</a>
{heap_size, Size}
Size is the heap size of the process in words.
{stack_size, Size}
Size is the stack size of the process in words.
{memory, Size}
Size is the size of the process in bytes. This includes call
stack, heap and internal structures.
</pre>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
erlang-questions mailing list
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
</blockquote>
<br>
</div>
</blockquote></div><br></div></div>
</div><br></div></div></div>