piątek, 17 sierpnia 2012

Maksymalna liczba ...

 
 Atoms
By default, the maximum number of atoms is 1048576. This limit can be raised or lowered using the +t option.

+t size
Set the maximum number of atoms the VM can handle. Default is 1048576.
 
 
Process
+P Number
Sets the maximum number of concurrent processes for this system. Number must be in the range 16..134217727. Default is 32768. 


Processes
The maximum number of simultaneously alive Erlang processes is by default 32768. This limit can be raised up to at most 268435456 processes at startup (see documentation of the system flag +P in the erl(1) documentation). The maximum limit of 268435456 processes will at least on a 32-bit architecture be impossible to reach due to memory shortage.

Distributed nodes
Known nodes
A remote node Y has to be known to node X if there exist any pids, ports, references, or funs (Erlang data types) from Y on X, or if X and Y are connected. The maximum number of remote nodes simultaneously/ever known to a node is limited by the maximum number of atoms available for node names. All data concerning remote nodes, except for the node name atom, are garbage-collected.

czwartek, 2 sierpnia 2012

dets

dets:open_file(abc, [{type, bag}]).

type:
bag - w pliku ni będą trzymane duplikaty
duplicate_bag - w pliku trzymane są duplikaty

auto_save - czas po jakim ma być zapisywany plik
 0 - ustawiam zero aby po każdym insert/delete tabela została zapisana


dets:open_file(abc1, [{type, duplicate_bag},{auto_save,0}]).

dets:insert(abc1, {1,2,3}).
dets:insert(abc1, {1,3,4}).
dets:lookup(abc1, 1).  
[{1,2,3},{1,3,4}]

przykład znaleziony w sieci:

{ok, N} = dets:open_file(schema, [{file, "./schema.DAT"},{repair,false}, 
                                  {keypos, 2}]),
F = fun(X) -> io:format("~p~n", [X]), continue end.,
dets:traverse(N, F),
dets:close(N). 

środa, 1 sierpnia 2012

eclipse - erlang


Instalacja środowiska eclipse.


Help -> Install new software. Następnie dodać http://erlide.org/update
Po instalacji restart środowiska i wszystko powinno działać.