<div dir="ltr">Hello Peer,<br><br><div><div class="gmail_extra"><div class="gmail_quote">On Tue, Aug 20, 2013 at 12:43 PM, Peer Stritzinger <span dir="ltr"><<a href="mailto:peerst@gmail.com" target="_blank">peerst@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">My favorite behaviour would be for Erlang to either grab all memory available or at least a fixed amount on startup and hold on to it forever. Hopefully without fragmenting it too much (I know in case of binary heaps that this isn't possible which is a bit disturbing to me).<br>
<br>
Can this be achieved by the current ERTS with some parameter settings?<br></blockquote><div><br>You could request that the main mbc (+M<S>mmbcs) should be preallocated to a certain size, and this would kind of get the effect you are looking for. However this is controlled on a per allocator level, so you have to figure out which type of memory it is that you are using. It also will only work for any mbcs allocated, all sbcs will still be allocated using mmap/malloc. If you want to force only mbcs you could up the sbct to very big, just remember to up lmbcs as well so that can fit all of your sbcs into the mbc. <br>
<br></div><div>I do not recommend doing this, but it is possible.<br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Which direction should I look if I want to add behaviour like this?<br>
<br>
BTW: next best thing is to malloc/free allways same size tiles this would avoid outer fragmentation and could be sped up relatively easily.<br></blockquote><div><br></div><div>The emulator already tries to do this to the best of its abilities. mbcs mmap requests grow depending on how you setup lmbcs, smbcs and mbcgs. sys_alloc (i.e. malloc) calls are always multiples of +<span class="">Muycs</span><span class="">. <br>
<br></span></div><div><span class="">You could set s</span><span class="">mbcs to the same as lmbcs if you want to, this makes it so that </span><span class="">all mbcs have that same size. </span><span class=""><br><br></span></div>
<div><span class="">Lukas</span><strong><span class=""><br></span></strong></div></div></div></div></div>