delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/07/07/20:45:03

From: Martin Str|mberg <ams AT father DOT ludd DOT luth DOT se>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: statfs() mystery deepens -- DJGPP workers exonerated, though!
Date: Sun, 8 Jul 2001 00:34:44 +0000 (UTC)
Organization: University of Lulea, Sweden
Lines: 28
Message-ID: <994552484.567738@queeg.ludd.luth.se>
References: <3B47A9FE DOT 106D49A9 AT alpha DOT delta DOT edu>
X-Trace: news.luth.se 994552484 12527 130.240.16.109 (8 Jul 2001 00:34:44 GMT)
X-Complaints-To: abuse AT luth DOT se
User-Agent: tin/pre-1.4-981225 ("Volcane") (UNIX) (SunOS/4.1.4 (sun4m))
Cache-Post-Path: queeg.ludd.luth.se!unknown AT father DOT ludd DOT luth DOT se
X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

David Witbrodt <dawitbro AT alpha DOT delta DOT edu> wrote:
: The discrepancy is here -- the statfs() "TEST" program reports 1 002
: 886 available blocks, while the call of statfs() in my program only
: yields 983040 available blocks.  (Immediately exiting gdb and running
: the "TEST" program still yields 1 002 886 available blocks.)

: Both programs (mine, and the "TEST" program) were recompiled
: immediately before I started gathering all of these figures. 
: Apparently the fault is mine somehow, but I don't understand how I
: could call statfs() differently to make it work the same way as the
: "TEST" program!  I should point out that I am compiling statfs() as a
: C++ function, while the "TEST" program compiles it as a C function.  I
: hardly think that could cause this differential behavior, though.

: Hope you wizards can show me the light, here!

Hohum. You are running in WINDOZE mode, right? Otherwise cwsdpmi might
create a swap file which could explain the difference as your program
is probably bigger than the little statfs test program.

One thing to try is to add printouts in every while and if statements
in statfs() to see which path the code is taking and see if there's a
difference.


Right,

						MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019