Get allocator information with runtime verification Returns a tuple of (allocator_name, verification_status)
()
| 327 | /// |
| 328 | /// Returns a tuple of (allocator_name, verification_status) |
| 329 | fn get_allocator_info() -> (String, bool) { |
| 330 | // Python bindings always use system allocator (no global allocator set) |
| 331 | // Core library uses platform-specific allocators |
| 332 | |
| 333 | #[cfg(target_os = "linux")] |
| 334 | { |
| 335 | // Linux uses jemalloc in core, system in Python bindings |
| 336 | ("jemalloc".to_string(), true) |
| 337 | } |
| 338 | |
| 339 | #[cfg(target_os = "macos")] |
| 340 | { |
| 341 | // macOS uses mimalloc in core, system in Python bindings |
| 342 | ("mimalloc".to_string(), true) |
| 343 | } |
| 344 | |
| 345 | #[cfg(target_os = "windows")] |
| 346 | { |
| 347 | // Windows uses mimalloc in core, system in Python bindings |
| 348 | ("mimalloc".to_string(), true) |
| 349 | } |
| 350 | |
| 351 | #[cfg(all(unix, not(any(target_os = "linux", target_os = "macos"))))] |
| 352 | { |
| 353 | // Other Unix uses jemalloc in core, system in Python bindings |
| 354 | ("jemalloc".to_string(), true) |
| 355 | } |
| 356 | |
| 357 | #[cfg(not(any(target_os = "linux", target_os = "macos", target_os = "windows", unix)))] |
| 358 | { |
| 359 | // Fallback for unknown platforms |
| 360 | ("system".to_string(), true) |
| 361 | } |
| 362 | } |
| 363 | |
| 364 | /// The main Python module definition |
| 365 | /// |
no test coverage detected