From 3002434a54ebf5c0e70a5fa88fe83e38f0ffd1a3 Mon Sep 17 00:00:00 2001 From: Ivo Bellin Salarin Date: Fri, 5 Sep 2025 18:58:17 +0200 Subject: [PATCH 1/3] fix: indicate the maximum amount of memory on macOS (83765) Fixed following the suggestion https://github.com/python/cpython/issues/83765#issuecomment-1093856620 --- Doc/library/multiprocessing.shared_memory.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Doc/library/multiprocessing.shared_memory.rst b/Doc/library/multiprocessing.shared_memory.rst index e8f04a6ac7b95d..2e2adda1cd07f3 100644 --- a/Doc/library/multiprocessing.shared_memory.rst +++ b/Doc/library/multiprocessing.shared_memory.rst @@ -69,6 +69,7 @@ copying of data. memory block may be larger or equal to the size requested. When attaching to an existing shared memory block, the *size* parameter is ignored. + On macOS, the maximum size of a shared memory block is 140256418463744 bytes. :param bool track: When ``True``, register the shared memory block with a resource From c4319902ed51a165ee67d455a720f0893ddcc3e2 Mon Sep 17 00:00:00 2001 From: Ivo Bellin Salarin Date: Sat, 6 Sep 2025 08:54:07 +0200 Subject: [PATCH 2/3] chore: numbers format Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> --- Doc/library/multiprocessing.shared_memory.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/multiprocessing.shared_memory.rst b/Doc/library/multiprocessing.shared_memory.rst index 2e2adda1cd07f3..04ac9450fbdb2f 100644 --- a/Doc/library/multiprocessing.shared_memory.rst +++ b/Doc/library/multiprocessing.shared_memory.rst @@ -69,7 +69,7 @@ copying of data. memory block may be larger or equal to the size requested. When attaching to an existing shared memory block, the *size* parameter is ignored. - On macOS, the maximum size of a shared memory block is 140256418463744 bytes. + On macOS, the maximum size of a shared memory block is 127 TiB (140,256,418,463,744 bytes). :param bool track: When ``True``, register the shared memory block with a resource From 3c34ccc3abcca4558dbc2a8a3b77db2231e55eb1 Mon Sep 17 00:00:00 2001 From: Ivo Bellin Salarin Date: Sat, 6 Sep 2025 13:54:59 +0200 Subject: [PATCH 3/3] fix: maximum size for a 64-bit process on mac 64 --- Doc/library/multiprocessing.shared_memory.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Doc/library/multiprocessing.shared_memory.rst b/Doc/library/multiprocessing.shared_memory.rst index 04ac9450fbdb2f..7d7403e4d91f29 100644 --- a/Doc/library/multiprocessing.shared_memory.rst +++ b/Doc/library/multiprocessing.shared_memory.rst @@ -69,7 +69,9 @@ copying of data. memory block may be larger or equal to the size requested. When attaching to an existing shared memory block, the *size* parameter is ignored. - On macOS, the maximum size of a shared memory block is 127 TiB (140,256,418,463,744 bytes). + On macOS, the theoretical addressable memory space for a 64-bit architecture + is limited to 128 TiB (:math:`128 \times 2^{40}` bytes). This amount + limits the maximum size of a shared memory block. :param bool track: When ``True``, register the shared memory block with a resource