| 826 | } |
| 827 | |
| 828 | void* _mi_os_alloc_aligned(size_t size, size_t alignment, bool commit, bool* large, mi_stats_t* tld_stats) |
| 829 | { |
| 830 | MI_UNUSED(&mi_os_get_aligned_hint); // suppress unused warnings |
| 831 | MI_UNUSED(tld_stats); |
| 832 | if (size == 0) return NULL; |
| 833 | size = _mi_os_good_alloc_size(size); |
| 834 | alignment = _mi_align_up(alignment, _mi_os_page_size()); |
| 835 | bool allow_large = false; |
| 836 | if (large != NULL) { |
| 837 | allow_large = *large; |
| 838 | *large = false; |
| 839 | } |
| 840 | return mi_os_mem_alloc_aligned(size, alignment, commit, allow_large, (large!=NULL?large:&allow_large), &_mi_stats_main /*tld->stats*/ ); |
| 841 | } |
| 842 | |
| 843 | /* ----------------------------------------------------------- |
| 844 | OS aligned allocation with an offset. This is used |
no test coverage detected