This message was edited by Gregry2 at 2006-2-6 1:26:1
: : This message was edited by stober at 2006-2-5 7:40:16
: : : : :
: : : : : Notepad limits the size of the file, Wordpad doesn't.
: : : : :
: : : :
: : : : So what, when you reach a certain point logically in a file which is the end of that which is loaded, it loads the rest?
: : : : {2}rIng
: : : :
: : :
: : : And deallocates the what's isn't needed.
: : : Simple buffering technices. But it is still easier to just load the whole file.
: : :
: :
: : yes, its certainly easier, but what happens if the file size is several gigs or terabytes? It won't all fit in memory at once, so you have to work with small chunks. I suspect Wordpad uses memory mapped files and let the os do all the difficult work of synchonizing the file with what is in memory.
: :
: :
: :
: : But -- neither Notepad nor Wordpad are MS-DOS editors, as indicated in the original post. They are MS-Windows editors. So if you are writing an MS-DOS editor then the program is limited to 640K (minus memory for the operating system and TSRs).
: :
:
: If you open a file bigger than 65K in notepad it says it can't open the file and suggest to open it in wordpad.
:
: It isn't much harder making a msdos editor than a windows one.
:
So, say the user gets to a certain point in the file beyond 64K in an MSDOS editor. Is this actually simply when the cursor passes a certain point? Then the memory in use is exchanged for the next 64K bytes of the file after the last, correct? Wouldn't that cause like a delay in the program and confuse the user?
I haven't made an editor before, but I want to make a program like a text file preprocessor, so please explain on this.
thanx
{2}rIng