lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Fri, 2023-07-28 at 14:28 -0300, Roberto Ierusalimschy wrote:
> My question was really about the internal alignment. Even if a file
> starts aligned, it would need internal padding to keep its structures
> and arrays aligned. The standard Lua binary format doesn't do that.
> Maybe eLua doesn't store the code using the standard Lua binary format?

ARM processors at least since v7, probably before that, support
misaligned memory access. May cost a few extra cycles, but works
transparently. That's why developers don't notice. And some don't
care at all and purposely create non-portable code (think packed
structs). WorksForThem(TM), seems to be popular.

virtually yours
Gerhard Sittig
     If you don't understand or are scared by any of the above
             ask your parents or an adult to help you.