Re: try this again
From: Howard (alicebt_at_hotmail.com)
Date: 12/02/04
- Next message: Jeff Flinn: "Re: Is there a vector base class?"
- Previous message: John Nagle: "Re: Floating point errors in collision routines"
- In reply to: Joseph: "try this again"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 02 Dec 2004 19:07:06 GMT
"Joseph" <crossgrid@gmail.com> wrote in message
news:conktq$73t$3@usenet01.srv.cis.pitt.edu...
> Modify the file system to allow the maximum size of a file to be as
> large as the disk (128Kbytes). In the basic file system, each file is
> limited to a file size of just under 4Kbytes. Each file has a header
> (class FileHeader) that is a table of direct pointers to the disk blocks
> for that file. Since the header is stored in one disk sector, the
> maximum size of a file is limited by the number of pointers that will
> fit in one disk sector. Increasing the limit to 128KBytes will probably
> but not necessarily require you to implement double indirect, or
> linked-list blocks.
>
> i get a segment fault when the file size is larger thank 8K. I'm pretty
> sure its in the Allocation method.
>
> attachment is the code
>
Your best bet to locate an error like this is to run it in the debugger, and
step through the funtion that you believe is failing. Look at the values of
the variables, especially the index when using loops. Also check that any
pointers that you dereference actually point to something that you've
dynamically allocated (and have not yet deleted). Once you've found the
line at which it actually crashes, you should know what's gone wrong. Then,
if you still don't see how to fix it, tell us which line fails, what the
relevant values were, and what you think they should have been. Then we can
help more easily.
I don't see SectorSize defined anywhere. The other calculations are all
based on this value. What is it defined as (and where is it defined)?
Could it be 0?
One other note: as mentioned in the FAQ, please post your responses either
at the bottom of the message, or intersepersed in the message, as
appropriate. Writing your response at the top is called "top posting", and
is frowned upon in usenet postings.
-Howard
- Next message: Jeff Flinn: "Re: Is there a vector base class?"
- Previous message: John Nagle: "Re: Floating point errors in collision routines"
- In reply to: Joseph: "try this again"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|