Sam Gross
ca22147547
gh-111924: Fix data races when swapping allocators (gh-130287)
...
CPython current temporarily changes `PYMEM_DOMAIN_RAW` to the default
allocator during initialization and shutdown. The motivation is to
ensure that core runtime structures are allocated and freed using the
same allocator. However, modifying the current allocator changes global
state and is not thread-safe even with the GIL. Other threads may be
allocating or freeing objects use PYMEM_DOMAIN_RAW; they are not
required to hold the GIL to call PyMem_RawMalloc/PyMem_RawFree.
This adds new internal-only functions like `_PyMem_DefaultRawMalloc`
that aren't affected by calls to `PyMem_SetAllocator()`, so they're
appropriate for Python runtime initialization and finalization. Use
these calls in places where we previously swapped to the default raw
allocator.
2025-02-20 11:31:15 -05:00
..
2025-02-12 12:32:58 +01:00
2025-02-07 12:59:52 +03:00
2024-06-12 14:24:46 +01:00
2024-06-27 09:58:44 +00:00
2025-02-19 11:44:57 +00:00
2025-01-23 01:44:43 +01:00
2025-02-19 11:44:57 +00:00
2025-02-16 13:32:39 +00:00
2024-07-01 08:49:33 +00:00
2024-06-04 10:22:22 +00:00
2025-02-19 11:44:57 +00:00
2025-01-20 17:04:35 +05:30
2025-02-16 03:01:24 +08:00
2025-02-19 11:44:57 +00:00
2025-02-20 13:18:47 +00:00
2025-02-07 22:39:54 +00:00
2025-01-31 09:45:35 +01:00
2024-02-02 13:50:51 +00:00
2024-04-02 20:35:52 +00:00
2025-02-12 12:32:58 +01:00
2024-12-23 13:31:33 +01:00
2024-11-12 10:41:51 -07:00
2024-11-11 14:49:41 -07:00
2025-02-05 11:03:58 +01:00
2024-06-27 09:58:44 +00:00
2023-10-04 22:50:29 +00:00
2023-10-04 22:50:29 +00:00
2023-10-04 22:50:29 +00:00
2023-10-04 22:50:29 +00:00
2025-01-23 08:02:04 +08:00
2025-01-31 09:45:35 +01:00
2025-02-19 11:44:57 +00:00
2025-01-22 11:04:19 +00:00
2025-02-14 14:15:08 +00:00
2024-10-09 17:15:23 +02:00
2025-01-21 10:15:02 +00:00
2024-11-22 18:50:30 +00:00
2024-03-21 18:20:20 -06:00
2024-10-29 23:57:59 +00:00
2025-02-13 11:50:45 -05:00
2024-07-22 12:08:27 -04:00
2025-02-13 11:50:45 -05:00
2025-02-19 11:44:57 +00:00
2024-11-08 14:23:50 +02:00
2024-11-12 15:59:19 +02:00
2025-01-11 11:17:35 +02:00
2024-05-18 19:44:40 +00:00
2025-01-08 14:50:40 +01:00
2023-12-06 15:09:22 +01:00
2025-02-20 11:31:15 -05:00
2024-08-13 14:44:57 -06:00
2024-11-04 11:13:32 -08:00
2025-02-20 11:31:15 -05:00
2024-04-26 17:20:30 +01:00
2025-02-12 10:16:43 -08:00
2024-04-03 01:10:26 +00:00
2024-05-04 12:12:10 +01:00
2025-02-02 15:19:55 -08:00
2025-01-20 17:04:35 +05:30
2024-10-14 14:06:31 +05:30
2025-01-23 02:54:23 +00:00
2025-02-18 17:14:11 +00:00
2024-07-22 12:08:27 -04:00
2025-02-16 03:01:24 +08:00
2025-02-07 11:41:17 -08:00
2025-02-07 22:39:54 +00:00
2025-02-12 17:44:59 +00:00
2025-01-20 15:49:15 +00:00
2025-02-12 10:16:43 -08:00
2024-11-11 15:58:46 -07:00
2025-02-20 11:31:15 -05:00
2024-05-11 16:19:31 -07:00
2024-12-03 11:20:20 -08:00
2024-11-07 16:37:41 +01:00
2024-08-30 15:42:27 +00:00
2025-01-31 09:45:35 +01:00
2025-02-20 11:31:15 -05:00
2024-11-01 22:04:31 +00:00
2025-02-19 11:44:57 +00:00
2024-10-09 17:15:23 +02:00
2025-02-19 11:44:57 +00:00
2025-01-20 17:04:35 +05:30
2025-02-06 18:49:29 +00:00
2025-02-07 22:39:54 +00:00
2024-12-20 16:52:20 +00:00
2024-12-09 13:28:57 +08:00
2024-12-03 09:41:53 -05:00
2024-06-24 17:11:47 +01:00
2025-02-19 11:44:57 +00:00
2025-02-20 11:31:15 -05:00
2024-10-02 09:17:49 -07:00
2024-10-13 20:59:41 +05:30
2024-10-02 09:17:49 -07:00
2024-02-21 11:46:00 +01:00
2024-03-13 23:53:32 +01:00
2025-01-27 15:07:39 +01:00
2025-01-24 14:29:36 +01:00
2025-01-17 16:42:27 +01:00
2024-06-04 10:22:22 +00:00