[aplusdev] IT WORKS!
Alexander Skomorokhov
askom at obninsk.com
Tue Feb 12 20:15:15 EST 2002
Brian,
Thanks a lot for your detailed explanation. Now I see the problem.
> It isn't a matter of file size it's how objects are created and
> manipulated in an application. If you create a vector of 1,000,000
> chars that will take about 1 million bytes. If you you want to sum the
> number of elements equal to a certain value the application creates a
> vector of values to add up. That's 1,000,000 integers. Multiply that
> by the size of an int on your platform. IA32, 4bytes/int == 4 million
> bytes for the 1's and 0's to represent the equivalence of each element
> of the original vector. Now your address space is 5,000,000 bytes.
>
> There's no formula that I know of to predict what operations will use
> how much memory. You can experiment to determine what your application
> requires.
You gave me a "formula" I asked for. Like if I work with char vector and
want
operation that requires intermediate integer representation I have to
decrease
file 4 times or work with smaller pieces at once. To find the upper limit
for
everything I have to experiment with floating numbers file. That's fine.
Sasha.
More information about the apluslist
mailing list