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 > Strange Out of ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 11 Topic 270 of 283
Post > Topic >>

Strange Out of memory error.

by "Luke" <luke987_1@[EMAIL PROTECTED] > Jun 18, 2008 at 08:38 PM

Hi,

Below is shown a simplified version of a construct I have been used for 
years without any problem, but now it produce an error 7(Out of memory).
What's new lately is that I have upgraded my memory from 1 to 2GB, and 
upgraded Windows XP from SP2 to SP3.
Have anyone experienced memory problem with WinXP SP3?
I tried making the array global, but that didn't make any difference.
--
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#COMPILER PBCC 4.04
#COMPILE EXE
#DIM ALL
$INCLUDE "Win32API.inc"
'----------------------------------------------------------------------------------
FUNCTION PBMAIN () AS LONG
  LOCAL Elements AS DWORD,ms AS MEMORYSTATUS
  TRY
   ms.dwLength = SIZEOF(MEMORYSTATUS)
   GlobalMemoryStatus ms
   Elements = ms.dwAvailPhys/%MAX_PATH
   DIM myArray(1 TO Elements) AS LOCAL ASCIIZ * %MAX_PATH
  CATCH
      ? "Error: " + FORMAT$(ERR)
  END TRY
  ? "Availablememory: " + FORMAT$(ms.dwAvailPhys,"#,") + " bytes"
  ? "Elements: "        + FORMAT$(Elements,"#,")
  ? "Press a key..."
  WAITKEY$
END FUNCTION
 




 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 11:23:07 CDT 2008.