# Storage-based array that implements @views?

**URL:** <https://discourse.julialang.org/t/storage-based-array-that-implements-views/52640>\
**Category:** General Usage\
**Tags:** question, array, memory-allocation\
**Created:** [December 31, 2020, 1:47am UTC](https://discourse.julialang.org/t/storage-based-array-that-implements-views/52640 "2020-12-31T01:47:05Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [December 31, 2020, 10:28pm UTC](https://discourse.julialang.org/t/storage-based-array-that-implements-views/52640/7 "2020-12-31T22:28:39Z")

</div>

You could just call `write` in a loop…, e.g.

```julia
open("mmap.bin", "w") do io
    write(io, 10^10)
    for i = 1:1000
        write(io, rand(10^7))
    end
end

```

---

_[View the full topic](https://discourse.julialang.org/t/storage-based-array-that-implements-views/52640)._
