🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.misc
Article #320

Re: Swapfile Question

#320
From: Sherwood Botsford
Date: Wed, 22 Jul 1992 16:42
36 lines
1854 bytes
Bob Peirce #305 writes
> In article <1992Jul16.195458.8181@kakwa.ucs.ualberta.ca>  
sherwood@fenris.space.ualberta.ca (Sherwood Botsford) writes:
> >	I agree that it would be nice if mach implemented some form of garbage  
> >collection so that the swapfile would shrink dynamically.    But it's really  
no  
> >worse than what the other unices do.
> 
> Also, at the risk of finding out the NeXT can do this, no Unix I have
> seen can shrink a file.  You can truncate them to zero, but as
> desirable as it would be, you can't seem to free part of a file.  On the
> surface this would seem to be a simple thing to do so maybe somebody
> does it, but I haven't seen it.
> 

Sorry Bob, Next can....

TRUNCATE(2)         UNIX Programmer's Manual          TRUNCATE(2)

NAME
     truncate - truncate a file to a specified length

SYNOPSIS
     truncate(path, length)
     char *path;
     off_t length;

     ftruncate(fd, length)
     int fd;
     off_t length;

DESCRIPTION
     Truncate causes the file named by path or referenced by fd
     to be truncated to at most length bytes in size.  If the
     file previously was larger than this size, the extra data is
     lost.  With ftruncate, the file must be open for writing.
Technical Details
Message-ID: <1992Jul22.164255.26504@kakwa.ucs.ualberta.ca>
Path: arc1-ca.pugleaf.net!sparky!uunet!darwin.sura.net!mips!zaphod.mps.ohio-state.edu!malgudi.oar.net!caen!batcomputer!cornell!uw-beaver!ubc-cs!unixg.ubc.ca!kakwa.ucs.ualberta.ca!news
References: <1992Jul21.110720.3224@investor.pgh.pa.us>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!darwin.sura.net!mips!zaphod.mps.ohio-state.edu!malgudi.oar.net!caen!batcomputer!cornell!uw-beaver!ubc-cs!unixg.ubc.ca!kakwa.ucs.ualberta.ca!news
From: sherwood@fenris.space.ualberta.ca (Sherwood Botsford)
Subject: Re: Swapfile Question
Message-ID: <1992Jul22.164255.26504@kakwa.ucs.ualberta.ca>
Sender: news@kakwa.ucs.ualberta.ca
Nntp-Posting-Host: fenris.space.ualberta.ca
Organization: University Of Alberta, Edmonton Canada
References: <1992Jul21.110720.3224@investor.pgh.pa.us>
Date: Wed, 22 Jul 1992 16:42:55 GMT
Lines: 37