Erlang – memory

Erlang memory

In this guide, we will discuss Erlang Memory. Returns a list containing information about memory dynamically allocated by the Erlang emulator. Each element of the list is a tuple {Type, Size}. The first element Type is an atom describing memory type.

Syntax

memory()

Parameters

  • None

Return Value

Returns a list containing information about memory dynamically allocated by the Erlang emulator.

For example

-module(helloworld). 
-export([start/0]). 

start() -> 
   io:fwrite("~p~n",[erlang:memory()]).

Output

When we run the above program we will get the following result. Depending on the system, the output will differ −

[{total,15515688},
{processes,4520064},
{processes_used,4516976},
{system,10995624},
{atom,132249},
{atom_used,119002},
{binary,768584},
{code,3002085},
{ets,221944}]

Next Topic : Click Here

This Post Has 2 Comments

Leave a Reply