Re: Unaligned memory access

Roberto Ierusalimschy <[email protected]>
Newsgroups gmane.comp.lang.lua.general
Message-ID <[email protected]>
> This assumes that 'realloc' returns memory aligned on 16-byte boundaries. I
> don't think that's guaranteed by the standard, at least I could not find it
> in the C23 one.

The standard says this: "The pointer returned if the allocation succeeds
is suitably aligned so that it may be assigned to a pointer to any
type of object and then used to access such an object or an array of
such objects in the space allocated".

So, if your system has objects that need 16-bit alignment, malloc must
respect that.

-- Roberto

-- 
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/lua-l/20260214223544.GA168741%40arraial.inf.puc-rio.br.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.