"Luke" <luke987_1@[EMAIL PROTECTED]
> wrote in message
news:Dgo6k.5915$lU5.4102@[EMAIL PROTECTED]
>
> "Michael Mattias" <mmattias@[EMAIL PROTECTED]
> skrev i melding
> news:j2d6k.8722$jI5.8581@[EMAIL PROTECTED]
>> Strangely enough, the error message is exactly correct: you are trying
to
>> allocate too much memory. Your available physical must now be such that
>> the total requirements for your program when you try to allocate all of
>> that 'available physical' exceed your 2 Gb user limit per process.
>
> I'm not sure I understand you correctly. The help file says, under
> Features of PBCC, "Use of all available memory(up to 2GB) for arrays and
> strings"
> In my case I have 1.3GB memory available.And there was no problem with
1GB
> memory installed.
While it appears from other replies your problem may be related to SP3,
let
me offer this.....
2 Gb is the ideal, the theoretical. I ran tests here using PB (forgot if I
used CC or WIN) and could never get more than 1.5 Gb allocated to my
process. It may have someting to do with allowed page file size or some
other system setting (Win/XP Pro SP2 all updates). I thought of one more
thing to try but I haven't got to that yet.
>
> The program don't know the number of elements in advance, so it just
pick
> a number of elements within available memory, and later, when number of
> elements is known, the array is being redimed.
>
> Maybe I could just write it all to a file instead of using an array.
Well, no reason you can't use both... as long as you process in "some
reasonable size" chunks.
Your demo code doesn't really describe the application, but since you say
you don't know the number of elements in advance I assume it is something
like, "select all records meeting some condition from a file or database
and
do something with them." Maybe if you describe the application a little
better (in English, not in code) someone can come up with some processing
options for you which will be both fast enough and efficient in its use of
system resources.
The choice to use "avaiable physical" memory is kind of a curious
choice...as I mentioned in my prior post, the physical memory available is
essentiallly a meaningless number, except in some very, very specialized
applications which take over the whole machine and do things at a very
very
deep level... things you would not do in a normal business application.
(Gamers might do some of these things; so might applications which control
hardware).
I think posting a one or two paragraph description of your application
with
some "typical" volume info would get you some pretty good ideas of how to
get your job done without running into memory-allocation issues.
--
Michael C. Mattias
Tal Systems Inc.
Racine WI
mmattias@[EMAIL PROTECTED]


|