Skip to content

Commit 5d33f19

Browse files
committed
Merge branch 'master' of github.com:torognes/vsearch
2 parents fc855eb + 21e6297 commit 5d33f19

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/arch.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
#include <cstdlib> // std::realloc, std::free
6868

6969

70-
constexpr auto memalignment = 16;
70+
constexpr auto vsearch_memalignment = 16;
7171

7272

7373
auto arch_get_memused() -> uint64_t
@@ -223,9 +223,9 @@ auto xmalloc(std::size_t size) -> void *
223223
size = std::max(size, minimal_allocation);
224224
void * ptr = nullptr;
225225
#ifdef _WIN32
226-
ptr = _aligned_malloc(size, memalignment);
226+
ptr = _aligned_malloc(size, vsearch_memalignment);
227227
#else
228-
if (posix_memalign(&ptr, memalignment, size) != 0)
228+
if (posix_memalign(&ptr, vsearch_memalignment, size) != 0)
229229
{
230230
ptr = nullptr;
231231
}
@@ -243,7 +243,7 @@ auto xrealloc(void * ptr, std::size_t size) -> void *
243243
static constexpr auto minimal_allocation = std::size_t{1};
244244
size = std::max(size, minimal_allocation);
245245
#ifdef _WIN32
246-
void * new_ptr = _aligned_realloc(ptr, size, memalignment);
246+
void * new_ptr = _aligned_realloc(ptr, size, vsearch_memalignment);
247247
#else
248248
void * new_ptr = realloc(ptr, size);
249249
#endif

0 commit comments

Comments
 (0)