forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


VDSWORLD Forum Checkup
Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code
View previous topic :: View next topic  
Author Message
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Sat Mar 08, 2003 3:43 am    Post subject: Reply with quote

Thanks for the PHP script Tommy.
Now I don't have to write my own, even though I was half finished with it Wink

And thank you for the positive comment Very Happy

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Sun Mar 09, 2003 3:44 pm    Post subject: VDS Forum Checkup crashed Reply with quote

My computer have been on all night and most of yesterday.
When I was checking my mail today a popup appeared with this message:

Exception: Out of system resources at line 357.

This is from the code I was running starting at line 347 (I think)
Code:
:message
repeat
if @greater(@pos([,%%message),0)
  if @greater(@pos(],%%message),@pos([,%%message))
    %%message = @strdel(%%message,@pos([,%%message),@pos(],%%message))
    else
   %%message = @strdel(%%message,@pos([,%%message),@len(%%message))
   end
  end
until @equal(@pos([,%%message),0)


I've never seen this message in VDS before but maybe someone else could look at it and hopefully see what's wrong Smile

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sun Mar 09, 2003 3:49 pm    Post subject: Reply with quote

I think it's the Windows Memory leak... That why it's almost impossible to run Windows based servers.... Maybe you can use MemTrax III which Garrett made to clear your memory?
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sun Mar 09, 2003 4:14 pm    Post subject: Reply with quote

... Or put in an automatic memory-reclaim part into the script:

Code:
REM    _____________________________________________________
REM   |\___________________________________________________/|
REM   | |                                                 | |
REM   | | SOURCE TITLE:    Memory Reclaim Example         | |
REM   | | ------------                                    | |
REM   | | SOURCE AUTHOR:   Garrett R. Hylltun             | |
REM   | | -------------                                   | |
REM   | | DATE:            04 January, 2001               | |
REM   | | ----                                            | |
REM   | | REQUIREMENTS:    VDS 3.x                        | |
REM   | | ------------                                    | |
REM   | | SOURCE STATUS:   Public Domain                  | |
REM   | | -------------                                   | |
REM   | | SOURCE DESCRIPTION:                             | |
REM   | | ------------------                              | |
REM   | |   This example shows you how to reclaim memory  | |
REM   | | using only VDS itself with no external dlls or  | |
REM   | | other programming languages.                    | |
REM   | |                                                 | |
REM   | |   This does not use the same routine as my      | |
REM   | | Memory-Trax program, which uses another form    | |
REM   | | of memory reclaiming.  This example is pure     | |
REM   | | VDS.  It's slow, but it's very very effect!     | |
REM   | | In most cases during the testing of this, the   | |
REM   | | people who tested it average 83% free memory    | |
REM   | | with every reclaim they did using this          | |
REM   | | method.  Because it was slow, it just wasn't    | |
REM   | | viable for me to use this method in             | |
REM   | | Memory-Trax, even though it was more            | |
REM   | | effective.  The other draw back, is you can't   | |
REM   | | control the actual amount of memory to reclaim  | |
REM   | | like you can in Memory-Trax.  There's just no   | |
REM   | | way to control that with this method.  And      | |
REM   | | trust me, I tried!  In fact, hear me out on     | |
REM   | | this.  I have spent almost a year researching   | |
REM   | | this memory stuff, and spent months on source   | |
REM   | | codes and experiments.  I just could not find   | |
REM   | | a way to control the amount of memory           | |
REM   | | reclaimed using this method.  It basically just | |
REM   | | cleans house, and does a damn good job of       | |
REM   | | doing it.                                       | |
REM   | |                                                 | |
REM   | |   This is also a very simple routine also.      | |
REM   | | You tell the program just how many megs of      | |
REM   | | installed memory you have.  When you reclaim,   | |
REM   | | the routine fills up a list with megs of X's    | |
REM   | | and O's just as filler.. It repeats this until  | |
REM   | | it has filled up the total amount of memory you | |
REM   | | have installed.  Anything that was in memory,   | |
REM   | | is placed in the cache memory.. Anything that   | |
REM   | | didn't belong in memory anymore, is tossed out  | |
REM   | | by windows.  When the process is over, Windows  | |
REM   | | only takes back what is needed for itself to    | |
REM   | | run.  Other programs that were in memory, that  | |
REM   | | are still running, will of course jump back     | |
REM   | | into memory when they do something, or you use  | |
REM   | | them again, but all the memory that was being   | |
REM   | | held by nothing is now cleared and available.   | |
REM   | |                                                 | |
REM   | |   You could automate this in a similar fashion  | |
REM   | | as my Memory-Trax, but you'll need to find a    | |
REM   | | way to grab how much memory the user has        | |
REM   | | installed, instead of having to ask like this   | |
REM   | | example does.                                   | |
REM   | |                                                 | |
REM   | |   Automating shouldn't take too much work.. That| |
REM   | | is, unless you go nuts and make something like  | |
REM   | | I did with Memory-Trax III, which took a year   | |
REM   | | of coding to make.                              | |
REM   | |                                                 | |
REM   | |   Anyway, make someting for yourself at least   | |
REM   | | with this.  This will help keep your system     | |
REM   | | running longer.                                 | |
REM   | |_________________________________________________| |
REM   |/___________________________________________________\|

  DIALOG CREATE,Memory Reclaim,-1,0,170,55
  DIALOG ADD,STYLE,STYLE2,Arial,8,,BLACK,CYAN
  DIALOG ADD,STYLE,STYLE1,Arial,10,B,BLACK,LTGREEN
  DIALOG ADD,TEXT,TEXT1,0,0,200,60,,STYLE1
  DIALOG ADD,TEXT,TEXT2,10,10,,,@name(@div(@sysinfo(freemem),1024)) Mb Free,STYLE1
  DIALOG ADD,BUTTON,BUTTON1,10,98,40,20,Go!
  DIALOG ADD,BUTTON,BUTTON2,10,144,20,20,X
  DIALOG ADD,TEXT,TEXT3,34,12,,,Idle.,STYLE2
:Askforram
REM   --- |-------------------------------------------------| ---
REM   --- |   Since I don't have a pure VDS way to get the  | ---
REM   --- | total physical memory installed, I have to ask  | ---
REM   --- | for how much is installed.  With a dll you      | ---
REM   --- | could probably get the total memory installed,  | ---
REM   --- | and you wouldn't have to ask.                   | ---
REM   --- |-------------------------------------------------| ---
  %%TotalMem = @input(What is your total installed RAM?)
  If @null(%%TotalMem)
    goto Askforram
  End
  DIALOG SHOW
  Option Sleeptime,100

:evloop
  Wait Event,0
  %E = @event()
  If %E
    goto %E
  End
  goto evloop


:Timer
  Dialog Set,TEXT2,@name(@div(@sysinfo(freemem),1024)) Mb Free
  goto evloop

:BUTTON2BUTTON
:Close
  Exit

:BUTTON1BUTTON
REM   --- |-------------------------------------------------| ---
REM   --- |   Ok, here we go.  Follow along now, actually,  | ---
REM   --- | it's not that complicated.  In fact, it's so    | ---
REM   --- | very simple, that I was mad at myself for       | ---
REM   --- | taking so long to figure this out.              | ---
REM   --- |-------------------------------------------------| ---
  Dialog Set,TEXT3,Reclaiming memory / 0
  List create,1
  List create,2
REM   --- |-------------------------------------------------| ---
REM   --- | Here we fill up a list with 1024 bytes          | ---
REM   --- | (characters), and we repeat until we have 1 meg | ---
REM   --- | worth of the list filled.. So there's going to  | ---
REM   --- | be 1024 entries in this list, each with 1024    | ---
REM   --- | characters, adding up to a total of 1 meg.      | ---
REM   --- |-------------------------------------------------| ---
  Repeat
    List Add,1,1OXOXOXOXOXOXOXOXOXOXOXOXOXOXOX0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0X0
    %%Null = @sum(%%Null,1)
  Until @equal(%%Null,1024)
  %%Null =
REM   --- |-------------------------------------------------| ---
REM   --- |   Now that we have 1 meg in the first list,     | ---
REM   --- | it's time to go full force into the memory      | ---
REM   --- | reclaim.  We do this by taking the number of    | ---
REM   --- | megs the user has installed for memory, and     | ---
REM   --- | filling up a second list with that amount.  We  | ---
REM   --- | have 1 meg in our first list, and we will now   | ---
REM   --- | repeat the next loop as many times as the       | ---
REM   --- | user has megs of memory.  So if the user has    | ---
REM   --- | 256 megs of memory, we will loop 256 times,     | ---
REM   --- | which means, we will have just stuffed 256      | ---
REM   --- | megs of X's and O's into the memory,            | ---
REM   --- | completely pushing out anything and everything  | ---
REM   --- | else.  Anything that wasn't being held by a     | ---
REM   --- | program, is tossed.. Which is what we want,     | ---
REM   --- | because that's what was holding up the extra    | ---
REM   --- | memory in the first place.  Everything else is  | ---
REM   --- | placed in cache, and is still available to your | ---
REM   --- | system.  When it's needed again, it's brought   | ---
REM   --- | back into the physical memory.                  | ---
REM   --- |-------------------------------------------------| ---
  Repeat
    List Add,2,@text(1)
    %%Null = @sum(%%Null,1)
    Dialog Set,TEXT3,Reclaiming memory / %%Null
  Until @equal(%%Null,%%TotalMem)
  List Clear,1
  List Close,1
  List Clear,2
  List Close,2
  Dialog Set,TEXT3,Idle
  goto evloop
REM   --- |-------------------------------------------------| ---
REM   --- |   And that's it!  Basically, Windows really     | ---
REM   --- | weeds out the the stuff that was stuck in       | ---
REM   --- | memory, we are just forcing windows to do it    | ---
REM   --- | since it was not able to do it on it's own.     | ---
REM   --- |-------------------------------------------------| ---

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Sun Mar 09, 2003 4:45 pm    Post subject: Reply with quote

Thanks.
That memory reclaim program seems to do the job.
I don't have a clue how that works, but it works so I'm happy Wink

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sun Mar 09, 2003 9:45 pm    Post subject: Reply with quote

It works by temporarily loading a large amount of text into a list. The
content of the list is stored in the memory. Old memory data which isn't
being claimed by an application will be pushed out of the physical memory
and into the Windows paging file, where it is eventually erased if the application
doesn't need it. After all unnecessary data is forced out of the physical
memory, the lists in the reclaim program are cleared and therefore it
leaves more room for new data entries. Wink

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Sun Mar 09, 2003 9:51 pm    Post subject: Reply with quote

Thanks for the info Freezy Wink
_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 737
Location: The Netherlands

PostPosted: Thu Mar 13, 2003 8:46 pm    Post subject: Reply with quote

You are probably using Windows 95/98/Me. Using those operating systems, apparently
there is a limited amount of "system resources". It seems that this amount is fixed and
there is no way to increase it (eg. putting more memory into your computer doesn't
seem to make any difference). Once all system resources get used up, I don't think there
is any way to resolve it, so then it is probably time to update to an NT based operating
system which offers an unlimited amount of system resources.

Personally I think Microsoft introduced this limit on system resources on purpose to force
users who are asking much from their system to upgrade to NT.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2146
Location: A House

PostPosted: Thu Mar 13, 2003 9:09 pm    Post subject: Reply with quote

Windows ME is known to be the poorest regarding the resource leak and
memory leak. The memory reclaim code above only deals with memory
and not resources, but, reclaiming the memory can help, as sometimes,
when windows is forced to deal with the memory, programs that were still
in memory as leaked memory may have also been holding resources,
and windows may release the resources as well.

-Garrett

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
http://www.freewarehome.com <-- Freeware listings since 1996
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Thu Mar 13, 2003 9:49 pm    Post subject: Reply with quote

One other small performance boost is to increase the minimum size of the
Windows swap file.

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Thu Mar 13, 2003 9:57 pm    Post subject: Reply with quote

Tommy wrote:
You are probably using Windows 95/98/Me. Using those operating systems, apparently...


No Tommy, actually I'm running Windows XP with SP1 and IE 6-SP1 on a P4 1.3GHz and it has 384 MB RAM.
But it might be caused by all the programs I'm running all the time. I do alot of testing of large programs and my dekstop is packed with icons Laughing

I hate cleaning up Wink

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Hortalonus
Valued Contributor
Valued Contributor


Joined: 15 Mar 2002
Posts: 344
Location: Western USA

PostPosted: Tue Mar 25, 2003 5:34 pm    Post subject: Reply with quote

Man! This little baby has blossomed since I first tried it out. The only thing left to add is the option to check your PM's when it checks for the latest post. I know MAC posted a VDS3 example of one way to do that a while back... it would be nice to have it included in the all in one Forum Checkup program.
Back to top
View user's profile Send private message Send e-mail
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Tue Mar 25, 2003 6:53 pm    Post subject: Reply with quote

Why don't you give it a try? Wink
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri May 16, 2003 8:42 pm    Post subject: Reply with quote

A new function has been added to DATA.PHP which will allow you
to see who is online.

To use this function, you should access DATA.PHP as following:

Code:
http://www.vdsworld.com/data.php?request=users


On behalf of VDSWORLD, I urge you to use the new function instead of
parsing text from VIEWONLINE.PHP


There is a problem with that which puts guest entries on the forum
when there shouldn't be. It also uses a lot more bandwidth to transfer
the VIEWONLINE.PHP than the DATA.PHP

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Hortalonus
Valued Contributor
Valued Contributor


Joined: 15 Mar 2002
Posts: 344
Location: Western USA

PostPosted: Fri May 16, 2003 9:12 pm    Post subject: Reply with quote

Changed it in mine. Thanks for the new function Tommy (or whomever added it)! Very Happy
_________________
"ah, come take my hand... we're ridin' out tonight to face the promised land"
Get a free iPod mp3 player...
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code All times are GMT
Goto page Previous  1, 2, 3, 4, 5  Next
Page 4 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum




Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group