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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:14:24+00:00 2026-05-28T07:14:24+00:00

What is the highest number Python 2.6’s x86 id() function can return? I presume

  • 0

What is the highest number Python 2.6’s x86 id() function can return?

I presume the ceiling must be the amount of memory any 32-bit application can see which must be: 232, i.e. 4294967296?

(Which would be fine as I have to fit this value in a C# type for which UInt32 or the CLS-compliant Int64 would suffice, which it the reason for my concern, though irrelevant to the question.)

But what if a I am running on Windows x64 with more than 2GB of memory say 32GB of memory – is it possible for Python’s id() function, even though the Python interpreter itself is x86, to return a value higher then 232???

I am guessing it comes down to the Python interpreter’s view of the machine – I imagine WoW64 translates 64-bit memory addresses to 32-bit addresses – but I am only guessing – I need to be sure!

  • 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-28T07:14:24+00:00Added an answer on May 28, 2026 at 7:14 am

    Assuming the documentation for id() is correct and CPython (x86) returns the address of the object, the maximum value that can be returned is 232-1 (4294967295). This can be demonstrated in a simple C program:

    #include <stdio.h>
    
    int main(void) {
        void* p = 0;          // specify a pointer at 0
        p = ~p;               // invert all bits
        uintptr_t x = p;      // convert to an integer type fo the same size
        printf("%lu\n", x);
        return 0;
    }
    

    This is true regardless of the underlying OS, an application compiled with a 32-bit pointer type can only specify addresses between 0 and 232-1. Note that the address visible in the application may not correspond to a particular physical memory address, due to the use of virtual memory.

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

Sidebar

Related Questions

What is the highest port number one can use?
Can anyone Please tell me how to How to find highest ,second highest number,
I need to find the highest number from 3 different numbers. The only thing
I'd like to update the (highest) revision number to a file inside a subversion
What is the highest class in the hierarchy I can use to pass HttpSessionState
I need a function to get the height of the highest element inside a
I have an array of ints. I want to get the second highest number
I have the following query that outputs the users that received the highest number
From a given double I want to get the next highest number according to
I want to find my friend whom I share with them the highest number

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.