- priority: 5 --> 3
This code (in v0.6.1) from include/Allocator.h causes compilation problems on EM64T (64-bit) systems because sizes of "int" (32 bit) and "void *" (64 bit) does not match:
//! Memory allocation, aligned.
static EXMAT_INLINE1
void* AlignedMalloc(size_t size, size_t align) {
// Assert align is power of 2, and bigger than sizeof(int)
// Assert int have the same size of (void*)
void* mem = malloc(size+align);
// Calculate the aligned value
void* newmem = reinterpret_cast<void*>((reinterpret_cast<int>(mem) + align) & ~(align-1));
// Save down the information needed when we call AlignedFree
*(reinterpret_cast<int*>(reinterpret_cast<int>(newmem)-sizeof(void*))) = int(mem);
return newmem;
}
//! Free the memory returned from AlignedMalloc
static EXMAT_INLINE2
void AlignedFree(void* p) {
void* mem = *(reinterpret_cast<void**>(int(p)-sizeof(void*)));
free(mem);
}
Also there are many issues with SIMD/SSE/AM_Math.cpp then trying to compile it for 64-bit system (wrong register names (for example RSI, not ESI)).