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
Tag: memory-alignment
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]
Responsibility of stack alignment in 32-bit x86 assembly
I am trying to get a clear picture of who (caller or callee) is reponsible of stack alignment. The case for 64-bit assembly is rather clear, that it is by caller. Referring to System V AMD64 ABI, section 3.2.2 The Stack Frame: The end of the input argument area shall be aligned on a 16 (32, if __m256 is passed
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,