Am 02.03.24 um 06:56 schrieb Paul Edwards:
Whose responsibility is it to clear BSS?
I assume it is the operating system.
Yes. More accurately the operating system initializes memory before it
is mapped into a different process. Otherwise one could simply allocate
memory and read from it to get information from other processes or even
kernel mode code.
I am now able to open and read/write files,
but during testing (on PDOS/386) I found an
issue which I believe is due to uninitialized BSS.
OS/2 and modern operating systems clear the memory. DOS does not clear anything. And in the C language reading from memory that has not been
written before is undefined behavior.
Marcel
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)