(08-20-2023, 02:56 PM)DSMan195276 Wrote:(08-20-2023, 09:10 AM)doppler Wrote: The same areas which contain uninitialized memory for storage. A dumb compiler will just assign the space. Which shows up as a random segment of the compiling computers memory.This is incorrect, modern binary formats like PE (Windows) and ELF (Linux) do not take up disk space with uninitiated memory. What actually happens is the compiler will create a memory segment that is listed as larger than its on-disk contents. The "extra space" that doesn't exist on disk is then allocated by the OS as a bunch of zero'd memory.
That said, the produced EXEs or executables are very unlikely to come out the same every time. You _can_ do that with `gcc`, people do, but it requires a little work to ensure that the compiler doesn't embed things like the date of compilation into the program (which will obviously screw it up). You can read about some of the challenges here.
I will say, I don't think QB64-PE uses the `__DATE__` and friends macros anywhere in the source, but I also don't really know for sure. `__FILE__` should only be used if you've turned on some C++ debugging information (you can't turn it on without editing the C++ code, so unlikely). Point being, I think there's a decent chance they could be deterministic just accidentally, but we've never checked and it's typically a hard thing to get right so I doubt it.
Programs compiled with QB64(pe), or in general using gcc will ALWAYS be different. Even if you compile the very same program several times (compile once, rename the exe, compile again) I always have at least 3 different bytes within the first 256 bytes, maybe a binary date/time entry?
GuiTools, Blankers & other Projects:
https://qb64phoenix.com/forum/forumdisplay.php?fid=32
Libraries & useful Functions:
https://qb64phoenix.com/forum/forumdisplay.php?fid=23
https://qb64phoenix.com/forum/forumdisplay.php?fid=32
Libraries & useful Functions:
https://qb64phoenix.com/forum/forumdisplay.php?fid=23