Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6543627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:22:10+00:00 2026-05-25T11:22:10+00:00

I’m working with large, and growing files using the managed wrappers for memory-mapped files:

  • 0

I’m working with large, and growing files using the managed wrappers for memory-mapped files: MemoryMappedFile, MemoryMappedViewAccessor.

I create empty files using this code:

long length = 1024L * 1024L * 1L; // 1MB

// create blank file of desired size (nice and quick!)
FileStream fs = new FileStream(filename, FileMode.CreateNew);
fs.Seek(length, SeekOrigin.Begin);
fs.WriteByte(0);
fs.Close();

// open MMF and view accessor for whole file
this._mmf = MemoryMappedFile.CreateFromFile(filename, FileMode.Open);
this._view = this._mmf.CreateViewAccessor(0, 0, MemoryMappedFileAccess.ReadWrite);

That works fine, up to 1GB. When I try 2GB, I get an IOException:

Not enough storage is available to process this command.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.MemoryMappedFiles.MemoryMappedView.CreateView(SafeMemoryMappedFileHandle memMappedFileHandle, MemoryMappedFileAccess access, Int64 offset, Int64 size)
at System.IO.MemoryMappedFiles.MemoryMappedFile.CreateViewAccessor(Int64 offset, Int64 size, MemoryMappedFileAccess access)
at (my code here)

I have a 64-bit version of Windows 7, the app is running as 64-bit, I have 6GB of RAM. All of that should be irrelevant, as far as I can tell though. These are large amounts of data, yes, however as I understand it the MemoryMappedFile and associated classes are the way to deal with large amounts of data like this.

As per the documentation, http://msdn.microsoft.com/en-us/library/dd267577.aspx, IOException literally means, ‘An I/O error occurred’. However, the file is on disk just fine.

The app regularly increases file size as needed as mentioned, and in fact the error occurs at some point fairly randomly between ~400MB and ~2GB. When starting with 1GB, that always succeeds. When starting at the default 1MB, it fails much sooner, presumably due to releasing and re-allocating resources. (I always Flush and Close on the view, MMF and and streams).

I need to randomly-access the whole range of data. I am hoping that I don’t need to dynamically maintain a dictionary of MemoryMappedViewAccessor objects – my interpretation on the virtual memory system used here would suggest that pages from a file of any size would be paged in and out as necessary by the memory system in Windows.

In the form of a question: why is this happening? How can I stop it? Is there a better way to achieve full, random, read-write access to files of any size? Up to 100GB for instance?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:22:10+00:00Added an answer on May 25, 2026 at 11:22 am

    The app was indeed set to target x86 rather than x64 in the specific project build configuration I had selected.

    My guess is my process address space had become full, since it was running in 32-bit mode.

    Solution – change platform target to x64 and run on a 64-bit OS.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have thousands of HTML files to process using Groovy/Java and I need to
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm making a simple page using Google Maps API 3. My first. One marker

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.