Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Basic Powerbasic > Re: Strange Out...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 11 Topic 270 of 283
Post > Topic >>

Re: Strange Out of memory error.

by "Michael Mattias" <mmattias@[EMAIL PROTECTED] > Jun 19, 2008 at 07:37 AM

"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]

 




 11 Posts in Topic:
Strange Out of memory error.
"Luke" <luke  2008-06-18 20:38:42 
Re: Strange Out of memory error.
"Michael Mattias&quo  2008-06-18 14:07:37 
Re: Strange Out of memory error.
"Luke" <luke  2008-06-19 09:53:48 
Re: Strange Out of memory error.
"Michael Mattias&quo  2008-06-19 07:37:26 
Re: Strange Out of memory error.
Peter Manders <news@[E  2008-06-19 17:13:59 
Re: Strange Out of memory error.
bok118@[EMAIL PROTECTED]   2008-06-19 09:54:31 
Re: Strange Out of memory error.
"Luke" <luke  2008-06-19 13:29:22 
Re: Strange Out of memory error.
Wolfgang Enzinger <weu  2008-06-24 11:33:40 
Re: Strange Out of memory error.
"Luke" <luke  2008-06-27 11:38:15 
Re: Strange Out of memory error.
"Michael Mattias&quo  2008-06-27 07:00:19 
Re: Strange Out of memory error.
bok118@[EMAIL PROTECTED]   2008-07-28 14:29:34 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Oct 14 8:26:17 CDT 2008.