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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:38:15+00:00 2026-05-26T02:38:15+00:00

I have written several program and found out that when compiled in 64bit, the

  • 0

I have written several program and found out that when compiled in 64bit, the memory mapping segment (where for example shared objects and shared memory are kept) is always located somewhere around 7f9aca84a000-7fff88400000 but never exactly the same.

I would like to know if there is a fixed start address for this memory segment on x86_64 architecture (ELF64) or what is the maximum and minimum range for this segment?

Here is why I ask this question. We are migrating a system from Tru64 UNIX to Linux. This system used a complex fixed memory mapping of IPC Sys V shared memory, and it is using chained list to go from structure to another inside this segment. With the size and complexity of this piece of code, and the limited time we have at hand, we are trying to find a robust way to fix the start of the share memory (effectively using shmat with a specified address at which to attach the segment).
With 64 bit, the virtual address space is so huge (48bit effectively possible addresses) that choosing a “safe” fixed address is much easier and less risky than on 32bit.

  • 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-26T02:38:16+00:00Added an answer on May 26, 2026 at 2:38 am

    The x86-64 memory mapping layout is defined in arch/x86/mm/mmap.c. As you can see, there are two strategies used: top-down and bottom-up.

    Top-down allocation is the default. It starts at 128MB below the maximum extent of the stack (as defined by the stack rlimit), tweaked by a random offset, and then allocates subsequent mappings downwards in memory from there.

    Bottom-up allocation is the fallback. It is used if either:

    • The stack rlimit is unlimited;
    • The process has the ADDR_COMPAT_LAYOUT personality set; or
    • The vm.legacy_va_layout sysctl is non-zero.

    Under bottom-up allocation, mapped regions are allocated progressively higher addresses, starting at TASK_SIZE / 3, tweaked by a random offset. TASK_SIZE on x86-64 is 0x800000000000, so bottom-up allocations will start at around 0x2AAAAAAAAAAA.

    I would suggest a suitable hole for your fixed mappings that should be OK under either allocation strategy is around 2 * TASK_SIZE / 3 – I would use 0x500000000000.

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

Sidebar

Related Questions

I have written a winform program that gathers information from several database tables and
I have a fairly large program written in C. It spans several files, and
I have written a C# app that runs constantly in a loop and several
I have written a console application in Delphi that queries information from several locations.
I have written a WinForms application (C# 2.0, VS2008) that registers several file types
I have a web application written in C# that consumes several internal web services.
I have a simple application written in C# and .Net 2.0 that displays several
I have a program written in C that has to input and output JSON
We have a front end written in Visual Basic 6.0 that calls several back
I am adapting a little rmi client-server application. I have written several things :

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.