07-19-2023, 10:27 AM
(07-18-2023, 10:11 PM)SMcNeill Wrote: It's all about what's most efficient, in general cases, for the OS to read/write data. (Note that things like #pragma pack and such alters such behavior.) Generally speaking, the OS is going to write data in 4-bytes (sectors if you want) on a 32-bit App and in 8-byte sectors on a 64-bit App.And why does QB64 reserve the same variables for me on a 32-bit OS in a 32-bit APP? So always 8 bytes for each variable.
>> NOTICE I SAID APP AND NOT OS!! 64-bit OSes will still pack 32-bit programs into 4-byte sectors, rather than 8-byte sectors, so everything defaults for compatibility reasons. <<
Shouldn't that be at least 4 bytes?
I don't quite get it.
QB64 would then have to reserve something else. And the gaps are never really filled. I've already declared umpteen variables and restarted the program. On a 64-bit as well as on a 32-bit OS. With a 32-bit app as well as with a 64-bit app of the same program.
And again and again I can observe the same thing in the memory viewer.
Do you have some example code that better illustrates that the memory behaves differently?
Because I can't reproduce it no matter what I do instead.
My Visual Studio C++ app works like you say. But somehow QB64 doesn't intend to do what you're telling me.
Don't get me wrong, I know what you're saying and how the memory should work. But somehow QB64 doesn't want to keep that ^^