
13 Mar
2014
13 Mar
'14
5:36 p.m.
On Thu, Mar 13, 2014 at 10:24 PM, Simon Marlow
It's a bad idea for large arrays (>= 3k), because when allocated via allocate() these arrays get a blocked marked with BF_LARGE that doesn't get copied during GC.
It might be a good idea for arrays less than this size (including the header). It's a bad idea if the size isn't statically known, though.
Sorry for not being clear. We will only do the inline *allocation* if the size <= 128 bytes. I'm talking about always inlining the *code* (whether it contains a call to allocate or not). In one case we will inline a definition reusing the heap check. In the other case we will inline a definition that calls allocate. -- Johan