Hi,
Micha Nelissen wrote:
function evk_malloc (size: longword): pointer;
const
ALIGNMENT = 16;
var
ptr: pointer;
begin
ptr := getmem(size + ALIGNMENT);
result := Align (ptr, ALIGNMENT);
if result = ptr then
pbyte(result) += 16;
Why not use ALIGNMENT here also?
Hah, I got stu
David Pethes wrote:
> pointer. So I mixed the two codes and come with something like this:
>
> function evk_malloc (size: longword): pointer;
> const
> ALIGNMENT = 16;
> var
> ptr: pointer;
> begin
> ptr := getmem(size + ALIGNMENT);
> result := Align (ptr, ALIGNMENT);
> if result = ptr t
Hi,
I'm writing a video codec. I need some of my memory aligned to 16-byte
boundaries, since I'm using SSE2 instructions in asm code, that assume
this alignment. I was using a custom getmem, that called classic getmem
to get some memory block, then cast the pointer and adjust it to next
aligne