Merge branch 'ms-page-fault' of github.com:drowe67/freedv-gui into ms-page-fault

ms-page-fault
Mooneer Salem 2025-06-15 08:08:52 -07:00
commit 4a51cb38c3
1 changed files with 3 additions and 1 deletions

View File

@ -30,7 +30,9 @@ void codec2_initialize_realtime(size_t heapSize)
Heap_ = (void*)_aligned_malloc(heapSize, sysInfo.dwPageSize);
#else
Heap_ = (void*)aligned_alloc(sysconf(_SC_PAGESIZE), heapSize);
auto pageSize = sysconf(_SC_PAGESIZE);
if (pageSize < O1HEAP_ALIGNMENT) pageSize = O1HEAP_ALIGNMENT;
Heap_ = (void*)aligned_alloc(pageSize, heapSize);
#endif // defined(WIN32)
assert(Heap_ != NULL);