[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: C programing and swap files



> From: Justin Oelgoetz <joelgoetz zeak tzo com>
> 
>    I needed to write a short c++ program to do some calculations, (For
> those of you who care, the stark manifolds) I wrote it, and it core
> dumped, probably because it wanted too much ram (an array [300] of
> structure of 2 arrays of double [10000], as well as 2 300x300 matrixies of
> double) (~20 MB of ram).  My machine didn't have that much free ram at
> the time, but it did have a 127 MB swap partition, none of which is being
> used.  When I cut back on the size of the array, it worked, but it didn't
> have enough elements to solve the problem.
> 
> Basically My question is this: why didn't it use the swap partition.  Is
> there something I need to do to get it to use the swap partition?
> 
> -- 
> Justin Oelgoetz
> Email: oelgoetz 1 osu edu

First, is your swap turned on - e.g., have you seen other programs use
swap space?  Netscape is always a good test of swap space :-)

Second, are you certain your program is correct?  Accessing beyond the
end of an array can easily cause a core dump.

If you know your swap space is working (for other programs) then it's
most likely your program.

Dave




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]