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 8441819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:40:12+00:00 2026-06-10T08:40:12+00:00

I watched a testcase for linux. it test for mmap like follows: #define HIGH_ADDR

  • 0

I watched a testcase for linux. it test for mmap like follows:

#define HIGH_ADDR       (void *)(0x1000000000000)
addr = mmap(HIGH_ADDR, map_sz, PROT_READ,
                MAP_SHARED | MAP_FIXED, fildes, 0);

In that case under PPC64, the Expected results is get an errno ENOMEM.
But Actual results under PPC64 is get an errno Invalid argument.
Anyway, it works well on X86_64 arch.
I think maybe the PPC64 haven’t assigned enough memory. So, I try to modify the HIGH_ADDR‘s define to:
#define HIGH_ADDR (void *)(0x7FFFFFFFFFF)
But it still get Invalid argument.
I just want to konw, How the linux for PPC64 manage his memory. I mean, I want to know the userspace program’s memory geography. Or what’s the MAX address Should I use.

  • 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-10T08:40:14+00:00Added an answer on June 10, 2026 at 8:40 am

    From man 2 mmap:

           EINVAL We don't like addr, length, or offset (e.g., they are too large,
                  or not aligned on a page boundary).
    
           EINVAL (since Linux 2.6.12) length was 0.
    
           EINVAL flags  contained neither MAP_PRIVATE or MAP_SHARED, or contained
                  both of these values.
    

    So mmap will signal an error with EINVAL if addr is too large. This is therefore expected behavior.

    Recommendation: Don’t use MAP_FIXED, unless you have a really good reason.

    Footnote: Not all 64-bit architectures support 64-bit addresses.

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

Sidebar

Related Questions

I have a controller route defined as follows: resources :watched, :controller => watched, :only
I watched the DNR TV episode with Glenn Block and it looks like MEF
I watched old videos that suggest to test the asp.net website load using Microsoft
I just watched the Windows Azure intro video and it left me feeling like
I watched few videos/webcasts about Oslo but I still fail to see how it
I watched this webcast recently, and I got the sense that a lot of
I've watched and viewed lots of pages on securing asp.net web api's - including:
I've watched this video from Google I/O 2009: http://www.youtube.com/watch?v=AgaL6NGpkB8 where Brett shows microblogging example.
I recently watched GoingNative2012 about, of course, C++11. In Bjarne Stroustrup section, I found
i have watched a site which has taught iphone application using dashcode.it says dashcode

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.