Skip to content

Commit b2ed687

Browse files
author
Grok Compression
committed
revert std::aligned_alloc changes for cross compile
1 parent 7e8a391 commit b2ed687

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/lib/codec/formats/fileio/IFileIO.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static inline void* grkAlignedAllocN(size_t alignment, size_t size)
5454
#ifdef _WIN32
5555
return _aligned_malloc(size, alignment);
5656
#else
57-
return ::aligned_alloc(alignment, size);
57+
return std::aligned_alloc(alignment, size);
5858
#endif
5959
}
6060
static void* grk_aligned_malloc(size_t size)

src/lib/core/plugin/gpup/gpu_plugin_shared.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ inline gpup_image* gpup_image_new(uint16_t numcmpts, gpup_image_comp* cmptparms,
492492
size_t dataSize = (size_t)stride * cmptparms[i].h * sizeof(int32_t);
493493
dataSize = ((dataSize + GPUP_BUFFER_ALIGNMENT - 1) / GPUP_BUFFER_ALIGNMENT) *
494494
GPUP_BUFFER_ALIGNMENT;
495-
img->comps[i].data = (int32_t*)::aligned_alloc(GPUP_BUFFER_ALIGNMENT, dataSize);
495+
img->comps[i].data = (int32_t*)std::aligned_alloc(GPUP_BUFFER_ALIGNMENT, dataSize);
496496
if(img->comps[i].data)
497497
memset(img->comps[i].data, 0, dataSize);
498498
img->comps[i].stride = stride;

src/lib/core/util/MemManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class MemoryManager
124124
#ifdef _WIN32
125125
void* ptr = _aligned_malloc(bytes, alignment);
126126
#else
127-
void* ptr = ::aligned_alloc(alignment, bytes);
127+
void* ptr = std::aligned_alloc(alignment, bytes);
128128
#endif
129129

130130
if(ptr && track_stats)

0 commit comments

Comments
 (0)