# slicer runs out of memory with large  file.

**URL:** <https://discourse.slicer.org/t/slicer-runs-out-of-memory-with-large-file/46720>\
**Category:** Support\
**Created:** [April 12, 2026, 2:55pm UTC](https://discourse.slicer.org/t/slicer-runs-out-of-memory-with-large-file/46720 "2026-04-12T14:55:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhsheikh25](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mhsheikh25/32/80222_2.png) [@mhsheikh25](https://discourse.slicer.org/u/mhsheikh25)\
**Post date:** [April 12, 2026, 2:55pm UTC](https://discourse.slicer.org/t/slicer-runs-out-of-memory-with-large-file/46720/1 "2026-04-12T14:55:44Z")

</div>

I have a Dell running 2 Platinum 8160 Xeons and 720GB ecc memory with a Nvidia 3090 24 GB video card and 3D slicer crashes on a large file with 300 Gb of memory remaining - error says that there isn’t enough memory. Is there a max addressable limit for memory?

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [April 12, 2026, 6:14pm UTC](https://discourse.slicer.org/t/slicer-runs-out-of-memory-with-large-file/46720/2 "2026-04-12T18:14:34Z")

</div>

You’ll need to provide more details on what you were trying to accomplish.

---

<div class="post-metadata">

**Author:** ![mhsheikh25](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mhsheikh25/32/80222_2.png) [@mhsheikh25](https://discourse.slicer.org/u/mhsheikh25)\
**Post date:** [April 12, 2026, 9:26pm UTC](https://discourse.slicer.org/t/slicer-runs-out-of-memory-with-large-file/46720/3 "2026-04-12T21:26:24Z")

</div>

I have a CT scan 90 micron per scan 7.7 Gb file. I have segmented the scan and when I try to create another island, I get an “out of memory” and you might fix it with increasing swap and ram.

---

<div class="post-metadata">

**Author:** ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)\
**Post date:** [April 13, 2026, 2:07pm UTC](https://discourse.slicer.org/t/slicer-runs-out-of-memory-with-large-file/46720/4 "2026-04-13T14:07:05Z")

</div>

I have a snippet of code in my .slicerrc.py file that would set the number of undo levels (which I think is defaulted to 10), I sometimes set it to 1 (or 0 if I’m feeling lucky). I don’t have it handy at the moment, but this may be something to try. I work with volumes larger than this on a machine with 128GB of ram and a 16GB NVIDIA RTX A5000, so you should be fine.

---

<div class="post-metadata">

**Author:** ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)\
**Post date:** [April 15, 2026, 4:53pm UTC](https://discourse.slicer.org/t/slicer-runs-out-of-memory-with-large-file/46720/5 "2026-04-15T16:53:05Z")

</div>

This is it - I’ve found it to be helpful with large segmentations.

```auto
def setUndoLevels(numLevels):
  segmentEditorWidget = slicer.modules.segmenteditor.widgetRepresentation().self().editor
  segmentEditorWidget.setMaximumNumberOfUndoStates(numLevels)

```

---

<div class="post-metadata">

**Author:** ![mhsheikh25](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mhsheikh25/32/80222_2.png) [@mhsheikh25](https://discourse.slicer.org/u/mhsheikh25)\
**Post date:** [April 15, 2026, 6:31pm UTC](https://discourse.slicer.org/t/slicer-runs-out-of-memory-with-large-file/46720/6 "2026-04-15T18:31:02Z")

</div>

Thanks, I’ll try it.
