🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #5451

Re: Files larger than available memory.

#5451
From: Matt "C P." Rush
Date: Wed, 26 Sep 1990 00:41
36 lines
2589 bytes
In article <1990Sep24.150432.25049@msuinfo.cl.msu.edu> dailey@frith.uucp (Chris Dailey) writes:
>In article <1990Sep23.174736.16118@lavaca.uh.edu> jet@karazm.math.uh.edu (J. Eric Townsend) writes:
>>It can be done.  It's somewhat bizarre, but it can be done.  Essentially,
>>you keep track of the changes to the file.  You change the file whenever
>>you reach one of a set of conditions:
>>-- size of changes > some default size
>>-- user is not doing anything (cycle stealing, of a sort :-)
>>-- user goes forward or backwards in the file some distance > x
>
>>Any questions?
>
>Why, yes.  What if the text to be inserted is greater than the space on
>the disk?  There is no super-elegant way of doing this.  You'd have to
>allocate more disk space, link it in.  Sounds like a lot of
>system-dependent stuff to me.

	It shouldn't be anymore 'system-dependent' than if you try to insert
more stuff than you have Main memory for.  IE, when your I/O to disk fails,
you tell the user that "sorry mem/disk is full" and drop them OUT of insert
mode.
	If you're buffering the inserted text before writing it, then you
ought to keep track of how much disk space is available, but it you just
send it direct to disk (gets(userinput); fputs(userinput, userfile);)
then there's no problem (other than speed, and the OS will hopefully buffer
it enough to be usable).

	-- Matt

    *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
    %    "I programmed three days        %      Beam me up, Scotty.      %
    %     And heard no human voices.     %     There's no Artificial     %
    %     But the hard disk sang."       %    Intelligence down here.    %
    %          -- Yoshiko                                                %
    %                            E-mail:  mrush@cscihp.ecst.csuchico.edu %
    *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
     This is a SCHOOL!  Do you think they even CARE about MY opinions?!
Technical Details
Message-ID: <1990Sep26.004152.8070@ecst.csuchico.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!ucbvax!ucdavis!csusac!csuchico.edu!mrush
References: <924@ucsvc.ucs.unimelb.edu.au> <1990Sep23.174736.16118@lavaca.uh.edu> <1990Sep24.150432.25049@msuinfo.cl.msu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!ucbvax!ucdavis!csusac!csuchico.edu!mrush
From: mrush@csuchico.edu (Matt "C P." Rush)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Files larger than available memory.
Message-ID: <1990Sep26.004152.8070@ecst.csuchico.edu>
Date: 26 Sep 90 00:41:52 GMT
References: <924@ucsvc.ucs.unimelb.edu.au> <1990Sep23.174736.16118@lavaca.uh.edu> <1990Sep24.150432.25049@msuinfo.cl.msu.edu>
Sender: news@ecst.csuchico.edu (USENET)
Reply-To: mrush@cscihp.UUCP
Organization: California State University, Chico
Lines: 36