# Stack allocation when passing large isbits objects

**URL:** <https://discourse.julialang.org/t/stack-allocation-when-passing-large-isbits-objects/4452>\
**Category:** General Usage\
**Created:** [June 25, 2017, 9:25pm UTC](https://discourse.julialang.org/t/stack-allocation-when-passing-large-isbits-objects/4452 "2017-06-25T21:25:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cstjean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cstjean/32/1444_2.png) [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Post date:** [June 25, 2017, 9:25pm UTC](https://discourse.julialang.org/t/stack-allocation-when-passing-large-isbits-objects/4452/1 "2017-06-25T21:25:33Z")

</div>

When passing around a large isbits object without modification, does Julia push a copy onto the stack each time it’s passed as an argument? Eg. in this code

```julia
using StaticArrays

@noinline f(x) = g(x)
@noinline g(x) = h(x)
@noinline h(x) = sum(x)

f(SVector(1:20...))

```

Does the stack grow by `4 * sizeof(SVector(1:20...))`? Is there an upper-bound beyond which Julia just heap-allocates the object?
