This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: EXE has file junk in it


Dean Limbaugh wrote:
>A word about MSDOS/WIN95/WINNT. Files sizes are always an integral number
>of clusters. This means a 1 byte file occupies a full cluster. Apparently,
>when a file is written to disk the unused portion of the buffer is not
>cleared, so whatever was there is written to the disk. This has been the
>case from DOS 1.0 and even Apple ][ proDOS. So thw behavior you see happens
>to ever program that writes a file. 

No, I don't think this is the problem here. For example,
say you create a text file that is, say, 2KB. Now it
might be taking up that minimum-cluster-deal on your HD,
but if you were to then transfer it to someone else, you
would only need to transfer that 2KB file - there is
nothing else actually *in* the file... it just needs some
extra wasted space when it is on your hard drive.

The case with the EXEs that GNU Win32 creates is different.
It is actually creating an EXE with a certain size, and
inside that size (not outside as in the case of the cluster
thing), is some garbage information or whatever... If you
then transfer that EXE to someone else, the garbage stays
with it, unlike the text file.

Bill Klein <bk@cheerful.com> - http://bk.base.org/

"Extraordinary claims require extraordinary evidence."
                                        -David Hume
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]