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

  • SEARCH
  • Home
  • 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 7925181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T18:10:31+00:00 2026-06-03T18:10:31+00:00

I am trying to mmap some large files but failed : I can’t mmap

  • 0

I am trying to mmap some large files but failed : I can’t mmap any file that’s larger than around 2.7 GB.

By doing ulimit -a, it says my virtual memory is unlimited. I then did cat /proc/meminfo it says my system has 3GB Memfree and 2GB Swapfree.

I am assuming I could mmap a file up to 5GB. I tried everything I learned on the internet, including using MAP_NORESERVE flag and set overcommit_memory to 1. It’s still the same, Cannot allocate memory. What could possibly go wrong?

I am using 64 bit cpu and a 32 bit linux system. Please let me know if you need anymore information. I would really appreciate any advice or tips.

  • 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-06-03T18:10:32+00:00Added an answer on June 3, 2026 at 6:10 pm

    Your application simply doesn’t have enough address space (useable memory addresses) to map a file that large.

    Under Linux, a 32 bit process running on a 32 bit kernel typically has around 3GB of address space available, and a 32 bit process running on a 64 bit kernel has 4GB of address space available. If you need more than that, you will need to compile your application as a 64 bit process. This will give you at least 128TB of address space.

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

Sidebar

Related Questions

Trying to find some information on this but am unable to get any results
I have a really large file I'm trying to open with mmap and its
I'm trying to mmap a file, and it seems to succeed but when I
I am trying to understand how to use the package mmap to access large
I am trying to create an app that can "Purposely" consume RAM as much
So, I understand that if you need some dynamically allocated memory, you can use
I am trying to use mmap to read a file using chunks of 1024.
I am trying to mmap a binary file (~ 8Gb) using the following code
I am trying to port some code to use the mmap package. I am
I am trying to benchmark file system I/O on Mac OS X using mmap.

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.