<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1265">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 15.0px; font: 12.0px Helvetica}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 15.0px; font: 12.0px Helvetica; min-height: 14.0px}
p.p3 {margin: 0.0px 0.0px 16.0px 12.0px; font: 16.0px Times; color: #011892}
p.p4 {margin: 0.0px 0.0px 0.0px 12.0px; font: 16.0px Times; color: #011892}
p.p5 {margin: 0.0px 0.0px 0.0px 12.0px; font: 16.0px Times; color: #011892; min-height: 19.0px}
p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Helvetica; min-height: 14.0px}
span.s1 {text-decoration: underline}
</style>
</head>
<body>
<p class="p1">You can increase the maximum number of atoms by passing the +t option to the emulator:</p>
<p class="p2"><br></p>
<p class="p1">http://www.erlang.org/doc/efficiency_guide/advanced.html#atoms</p>
<p class="p2"><br></p>
<p class="p1">Not sure how to pass emulator options to erlc but you can use something like:</p>
<p class="p2"><br></p>
<p class="p1">erl +t <numberofatoms> -compile Mod1 Mod2</p>
<p class="p2"><br></p>
<p class="p1">or also use -make if you want to.</p>
<p class="p2"><br></p>
<p class="p1">Cheers,</p>
<p class="p1">-- Peer</p>
<p class="p2"><br></p>
<p class="p2"><br></p>
<p class="p1">On 2014-01-23 16:38:57 +0000, Vance Shipley said:</p>
<p class="p2"><br></p>
<p class="p3">I don't necessarily need to do what I am doing, it just works quite well ... up to a point. The alternative involves a lot of list processing. Clause head matching on the other hand is really fast. My challenge is to match a very large number of patterns and to do it very fast and with the lowest cost.</p>
<p class="p4">On Jan 23, 2014 9:04 PM, "Anthony Ramine" <<a href="mailto:n.oxyde@gmail.com"><span class="s1">n.oxyde@gmail.com</span></a>> wrote:</p>
<p class="p4">Sorry I didn’t reply to all the first time, putting the list back in the loop.</p>
<p class="p5"><br></p>
<p class="p4">Probably this problem was never encountered before. Do you really need to do whatever you are doing like this?</p>
<p class="p5"><br></p>
<p class="p4">--</p>
<p class="p4">Anthony Ramine</p>
<p class="p5"><br></p>
<p class="p4">Le 23 janv. 2014 à 16:29, Vance Shipley <<a href="mailto:vances@motivity.ca"><span class="s1">vances@motivity.ca</span></a>> a écrit :</p>
<p class="p5"><br></p>
<p class="p4">> I'm well aware of the limits on the atom table, how to change it and that it's not garbage collected.</p>
<p class="p4">></p>
<p class="p4">> I'm not creating these atoms in my abstract forms. It appears to be core Erlang (cerl) which is creating atoms.</p>
<p class="p4">> On Jan 23, 2014 8:50 PM, "Anthony Ramine" <<a href="mailto:n.oxyde@gmail.com"><span class="s1">n.oxyde@gmail.com</span></a>> wrote:</p>
<p class="p4">> Yes and no, the atom table being limited in size is by design (cf. EEP20).</p>
<p class="p4">></p>
<p class="p4">> What are you compiling, though, to reach such a limit? That sounds completely insane to me.</p>
<p class="p4">></p>
<p class="p4">> --</p>
<p class="p4">> Anthony Ramine</p>
<p class="p4">></p>
<p class="p4">> Le 23 janv. 2014 à 15:54, Vance Shipley <<a href="mailto:vances@motivity.ca"><span class="s1">vances@motivity.ca</span></a>> a écrit :</p>
<p class="p4">></p>
<p class="p4">> > I am finding that when I dynamically build a function with</p>
<p class="p4">> > a very large number of clauses the emulator crashes while</p>
<p class="p4">> > compilig (cmpile:forms/2) after hitting the atom table limit.</p>
<p class="p4">> > Looking at a erl_crash_.dump I can see that it was filling up</p>
<p class="p4">> > the atom table with 'corN' where N is an ever increasing number.</p>
<p class="p4">> ></p>
<p class="p4">> > Is this a design limitation?</p>
<p class="p4">> ></p>
<p class="p4">> > --</p>
<p class="p4">> >       -Vance</p>
<p class="p4">> > _______________________________________________</p>
<p class="p4">> > erlang-questions mailing list</p>
<p class="p4">> > <a href="mailto:erlang-questions@erlang.org"><span class="s1">erlang-questions@erlang.org</span></a></p>
<p class="p4">> > <a href="http://erlang.org/mailman/listinfo/erlang-questions"><span class="s1">http://erlang.org/mailman/listinfo/erlang-questions</span></a></p>
<p class="p4">></p>
<p class="p6"><br></p>
</body>
</html>