Skip to content

Conversation

@maxbachmann
Copy link

@maxbachmann maxbachmann commented May 6, 2025

This is a patch set I used to build mimalloc on the xbox to get Cpython to build there.

The following functions / types are unavailable:

  • NTSTATUS not available
  • GetConsoleScreenBufferInfo, CONSOLE_SCREEN_BUFFER_INFO and WriteConsoleA unavailable
  • GetNumaNodeProcessorMask unavailable
  • GetLargePageMinimum unavailable

The functions for GetPhysicallyInstalledSystemMemory aren't available either, but they aren't used in the mimalloc version in Cpython 3.13. Since they are dynamically loaded it's quite likely that they won't cause any problems.

I wasn't entirely sure how you would like to have the api family guards defined / used in there.

@daanx
Copy link
Collaborator

daanx commented Jun 8, 2025

Thank you so much for the upstream from CPython -- highly appreciated. I merged this manually where I avoid the use of MI_HAS_HUGE_PAGE_API and do all of those dynamically which should work. For the console I still use the static define.
Let me know if this works for you. Thanks again.

@maxbachmann
Copy link
Author

Yes your patch works as expected 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants