| 662 | } |
| 663 | |
| 664 | MemoryPool* default_memory_pool() { |
| 665 | auto backend = DefaultBackend(); |
| 666 | switch (backend) { |
| 667 | case MemoryPoolBackend::System: |
| 668 | return global_state.system_memory_pool(); |
| 669 | #ifdef ARROW_JEMALLOC |
| 670 | case MemoryPoolBackend::Jemalloc: |
| 671 | return global_state.jemalloc_memory_pool(); |
| 672 | #endif |
| 673 | #ifdef ARROW_MIMALLOC |
| 674 | case MemoryPoolBackend::Mimalloc: |
| 675 | return global_state.mimalloc_memory_pool(); |
| 676 | #endif |
| 677 | default: |
| 678 | ARROW_LOG(FATAL) << "Internal error: cannot create default memory pool"; |
| 679 | return nullptr; |
| 680 | } |
| 681 | } |
| 682 | |
| 683 | #ifndef ARROW_JEMALLOC |
| 684 | Status jemalloc_set_decay_ms(int ms) { |