# \#mmap

**URL:** https://discourse.julialang.org/tag/mmap/454.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Struggling to use Mmap with ZipArchives](https://discourse.julialang.org/t/struggling-to-use-mmap-with-ziparchives/129839)

<div class="topic-metadata">

**Author:** [@TimG](https://discourse.julialang.org/u/TimG)\
**Replies:** 20\
**Last updated:** [June 30, 2025, 4:31pm UTC](https://discourse.julialang.org/t/struggling-to-use-mmap-with-ziparchives/129839 "2025-06-30T16:31:42Z")

</div>

I’m struggling to get ZipArchives.jl and Mmap.jl to work together in the way I want - basically just following the docs. MWE looks like this: using ZipArchives using Mmap io=open("simpletest.zip") mm=Mmap.mmap(io) q =…

---

## [Method to unsafely close a mmap](https://discourse.julialang.org/t/method-to-unsafely-close-a-mmap/129900)

<div class="topic-metadata">

**Author:** [@nhz2](https://discourse.julialang.org/u/nhz2)\
**Replies:** 1\
**Last updated:** [June 16, 2025, 7:41am UTC](https://discourse.julialang.org/t/method-to-unsafely-close-a-mmap/129900 "2025-06-16T07:41:38Z")

</div>

Currently the Mmap.mmap function uses a finalizer to handle calling munmap or UnmapViewOfFile when the array is garbage collected. It is useful to be able to do this finalization eagerly despite the potential risks if t…

---

## [Does Mmap.sync! from disk to array, array to disk, or both?](https://discourse.julialang.org/t/does-mmap-sync-from-disk-to-array-array-to-disk-or-both/126012)

<div class="topic-metadata">

**Author:** [@ilanggear](https://discourse.julialang.org/u/ilanggear)\
**Replies:** 2\
**Last updated:** [February 17, 2025, 11:37pm UTC](https://discourse.julialang.org/t/does-mmap-sync-from-disk-to-array-array-to-disk-or-both/126012 "2025-02-17T23:37:30Z")

</div>

I’m trying to understand how to use memory mapping. Here’s a bit of code that represents what I’d like to do. I want to write to an array, and have the changes propagated to a file. Is that not how Mmap works? The co…

---

## [Trouble using Mmap](https://discourse.julialang.org/t/trouble-using-mmap/125924)

<div class="topic-metadata">

**Author:** [@ilanggear](https://discourse.julialang.org/u/ilanggear)\
**Replies:** 5\
**Last updated:** [February 14, 2025, 11:00pm UTC](https://discourse.julialang.org/t/trouble-using-mmap/125924 "2025-02-14T23:00:07Z")

</div>

Hi, I’m exploring the use of mmap and getting the error below when mmap is called The line is: countIndex = mmap(“tmp”, Matrix{UInt32}, (NUM\_BIGRAMS,30); shared=false) I’ve also tried a file handle as produced by ‘ope…

---

## [Determine if Array is Mmap?](https://discourse.julialang.org/t/determine-if-array-is-mmap/87354)

<div class="topic-metadata">

**Author:** [@JesperMartinsson](https://discourse.julialang.org/u/JesperMartinsson)\
**Replies:** 4\
**Last updated:** [October 6, 2024, 7:34am UTC](https://discourse.julialang.org/t/determine-if-array-is-mmap/87354 "2024-10-06T07:34:23Z")

</div>

Is there a way to determine if an Array is memory mapped or standard? For example, taken from the doc: # Create a file for mmapping # (you could alternatively use mmap to do this step, too) using Mmap A = rand(1:20, 5,…

---

## [Storing lots of time series](https://discourse.julialang.org/t/storing-lots-of-time-series/115169)

<div class="topic-metadata">

**Author:** [@alemelis](https://discourse.julialang.org/u/alemelis)\
**Replies:** 12\
**Last updated:** [June 5, 2024, 7:35pm UTC](https://discourse.julialang.org/t/storing-lots-of-time-series/115169 "2024-06-05T19:35:46Z")

</div>

Hello, I’ve a large number of time series as result of my simulations. As today the dataset is made of ~1e7 time series (100 points each), stored on disk in .csv files (each one containing 5 of them). I’ll have more (1…

---

## [Is there a DataFrame that can be memory mapped to a file?](https://discourse.julialang.org/t/is-there-a-dataframe-that-can-be-memory-mapped-to-a-file/96926)

<div class="topic-metadata">

**Author:** [@ktdq](https://discourse.julialang.org/u/ktdq)\
**Replies:** 7\
**Last updated:** [December 13, 2023, 10:35am UTC](https://discourse.julialang.org/t/is-there-a-dataframe-that-can-be-memory-mapped-to-a-file/96926 "2023-12-13T10:35:23Z")

</div>

Just saw Make loading weights 10-100x faster on Hacker News Is there something equivalent in Julia? Is there a way to store DataFrame in a file so it loads instantly via mmap?

---

## [Stream large file via HTTP](https://discourse.julialang.org/t/stream-large-file-via-http/103486)

<div class="topic-metadata">

**Author:** [@sschmidhuber](https://discourse.julialang.org/u/sschmidhuber)\
**Replies:** 0\
**Last updated:** [September 3, 2023, 4:45pm UTC](https://discourse.julialang.org/t/stream-large-file-via-http/103486 "2023-09-03T16:45:57Z")

</div>

Hello all, my goal is to stream a large file via a HTTP GET request to a client. The file is potentially larger than my server’s memory. Related to that, I found the following on Stack Overflow: stream - Send a large fi…

---

## [Memory usage with mmap file](https://discourse.julialang.org/t/memory-usage-with-mmap-file/59883)

<div class="topic-metadata">

**Author:** [@KKesgin](https://discourse.julialang.org/u/KKesgin)\
**Replies:** 17\
**Last updated:** [September 16, 2021, 3:38am UTC](https://discourse.julialang.org/t/memory-usage-with-mmap-file/59883 "2021-09-16T03:38:55Z")

</div>

Hi All I’m accessing a very large binary file randomly on windows. I don’t dare to put in all the code but I managed to replicate the behavior with a small loop. Could someone please explain to me why this is causing in…

---

## [Mmap Symmetric Matricies](https://discourse.julialang.org/t/mmap-symmetric-matricies/63158)

<div class="topic-metadata">

**Author:** [@RobertGregg](https://discourse.julialang.org/u/RobertGregg)\
**Replies:** 3\
**Last updated:** [June 19, 2021, 8:30pm UTC](https://discourse.julialang.org/t/mmap-symmetric-matricies/63158 "2021-06-19T20:30:48Z")

</div>

I have a matrix that is too large to fit into memory, so I’ve decided to use Mmap to store it on disk which works perfectly. However, the matrix I’m storing is symmetric and it seems like a waste to use twice the amount …

---

## [Mmap access denied with SharedArrays](https://discourse.julialang.org/t/mmap-access-denied-with-sharedarrays/44881)

<div class="topic-metadata">

**Author:** [@mfariacastro](https://discourse.julialang.org/u/mfariacastro)\
**Replies:** 0\
**Last updated:** [August 13, 2020, 3:34pm UTC](https://discourse.julialang.org/t/mmap-access-denied-with-sharedarrays/44881 "2020-08-13T15:34:27Z")

</div>

I am running 1.5.0 on Windows. I keep running into an issue when creating a SharedArray. I am able to replicate the problem about 30% of the time. This is very annoying as it essentially means my code keeps crashing. Thi…

---

## [Is it possible to mmap part of the file?](https://discourse.julialang.org/t/is-it-possible-to-mmap-part-of-the-file/40391)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 1\
**Last updated:** [May 29, 2020, 3:36am UTC](https://discourse.julialang.org/t/is-it-possible-to-mmap-part-of-the-file/40391 "2020-05-29T03:36:25Z")

</div>

I see the doc here has example of how to mmap the whole file Memory-mapped I/O · The Julia Language But say if I want to mmap bytes n to m of a file to an array, is that possible? Do I have to use unsafe\_wrap?

---

## [I need advices to solve Ax=b with Mmap](https://discourse.julialang.org/t/i-need-advices-to-solve-ax-b-with-mmap/28662)

<div class="topic-metadata">

**Author:** [@Noel\_Araujo](https://discourse.julialang.org/u/Noel_Araujo)\
**Replies:** 16\
**Last updated:** [September 13, 2019, 11:14pm UTC](https://discourse.julialang.org/t/i-need-advices-to-solve-ax-b-with-mmap/28662 "2019-09-13T23:14:57Z")

</div>

Hellos My topic title is clear, I am solving Ax=b (x=A\\b). I know that my system will become big, and I want to try Mmap to store my data. Here the basic code: using Mmap N = 2\_000 A = rand(N, N) b = rand(N) io\_A = …

---

## [Mmap.mmap leaves the file open](https://discourse.julialang.org/t/mmap-mmap-leaves-the-file-open/19413)

<div class="topic-metadata">

**Author:** [@1112](https://discourse.julialang.org/u/1112)\
**Replies:** 5\
**Last updated:** [January 10, 2019, 5:22am UTC](https://discourse.julialang.org/t/mmap-mmap-leaves-the-file-open/19413 "2019-01-10T05:22:31Z")

</div>

Hello, here is my code open(filename, "w+") do io C = Mmap.mmap(io, BitArray, (64,10^3)); BinX = getHash(r.x) for p=1:length(BinX) C\[p, 1\] = parse(Int, BinX\[p\]) end Mmap.sync!(C); end After I try t…

---

## [Write to the file the structure of the form (key =\> value) followed by reading using Mmap.mmap](https://discourse.julialang.org/t/write-to-the-file-the-structure-of-the-form-key-value-followed-by-reading-using-mmap-mmap/18680)

<div class="topic-metadata">

**Author:** [@1112](https://discourse.julialang.org/u/1112)\
**Replies:** 12\
**Last updated:** [December 16, 2018, 1:35am UTC](https://discourse.julialang.org/t/write-to-the-file-the-structure-of-the-form-key-value-followed-by-reading-using-mmap-mmap/18680 "2018-12-16T01:35:02Z")

</div>

There are two numbers B and A. You must save their file as \[B =\> A\]. Then, using Mmap.mmap, read this file and search B, if B is found to get a value A. Please tell me how to do it. I can not understand how nested array…
