Commit 2132cb3
authored
### Rationale for this change
We can use `arrow::default_cpu_memory_manager()` for `default_memory_pool()`.
### What changes are included in this PR?
Check the given `pool` and use `arrow::default_cpu_memory_manager()` if it's `arrow::default_memory_pool()`.
This also caches `arrow::CPUDevice::memory_manager()` result to avoid calling it multiple times. Note that we can avoid creating needless memory manager instance without this. This just avoid calling it multiple times.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
No.
* Closes: #39270
Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
1 parent 30c4e15 commit 2132cb3
2 files changed
Lines changed: 14 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
245 | 249 | | |
246 | 250 | | |
247 | 251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
| 610 | + | |
610 | 611 | | |
611 | 612 | | |
612 | 613 | | |
| |||
822 | 823 | | |
823 | 824 | | |
824 | 825 | | |
825 | | - | |
826 | | - | |
| 826 | + | |
827 | 827 | | |
828 | 828 | | |
829 | 829 | | |
| |||
834 | 834 | | |
835 | 835 | | |
836 | 836 | | |
837 | | - | |
838 | | - | |
839 | | - | |
| 837 | + | |
| 838 | + | |
840 | 839 | | |
841 | 840 | | |
842 | 841 | | |
843 | 842 | | |
844 | 843 | | |
845 | | - | |
846 | | - | |
| 844 | + | |
| 845 | + | |
847 | 846 | | |
848 | 847 | | |
849 | 848 | | |
| |||
911 | 910 | | |
912 | 911 | | |
913 | 912 | | |
914 | | - | |
915 | | - | |
| 913 | + | |
916 | 914 | | |
917 | 915 | | |
918 | 916 | | |
| |||
924 | 922 | | |
925 | 923 | | |
926 | 924 | | |
927 | | - | |
928 | | - | |
| 925 | + | |
929 | 926 | | |
930 | 927 | | |
931 | 928 | | |
| |||
951 | 948 | | |
952 | 949 | | |
953 | 950 | | |
| 951 | + | |
954 | 952 | | |
955 | 953 | | |
956 | 954 | | |
| |||
0 commit comments