Skip to content
Advertisement

Tag: memory-alignment

Is there a linux equivalent of _aligned_realloc

Is there a linux equivalent of _aligned_realloc? I want to use realloc so I don’t have to memcpy the data every time I resize it. Am I stuck with mmap? I only used mmap once is there a recommended way of implementing memory that will be resized a few times? I’m assuming I can’t mix mmap with aligned_alloc and I

How to emulate ARM unaligned memory access exceptions?

I’m writing a cross-platform application which works on x86 machines, but crashes with “Bus error” on the actual ARM hardware (Raspberypi 2) … … but runs without any problems in Qemu. I run this command to enable SIGBUS signal and notification in the kernel running under Qemu, but it doesn’t seem to have any effect: echo 5 > /proc/cpu/alignment [2]

SSE: unaligned load and store that crosses page boundary

I read somewhere that before performing unaligned load or store next to page boundary (e.g. using _mm_loadu_si128 / _mm_storeu_si128 intrinsics), code should first check if whole vector (in this case 16 bytes) belongs to the same page, and switch to non-vector instructions if not. I understand that this is needed to prevent coredump if next page does not belong to

Prohibit unaligned memory accesses on x86/x86_64

I want to emulate the system with prohibited unaligned memory accesses on the x86/x86_64. Is there some debugging tool or special mode to do this? I want to run many (CPU-intensive) tests on the several x86/x86_64 PCs when working with software (C/C++) designed for SPARC or some other similar CPU. But my access to Sparc is limited. As I know,

Advertisement