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 


Memory Leak in LIST SAVEFILE...

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Tue Jan 08, 2002 11:05 pm    Post subject: Memory Leak in LIST SAVEFILE... Reply with quote

Just curious. Does anyone know if SADE fixed the SAVEFILE
Memory leak in VDS4 updates yet?

Here's a program to test it with a 40k file (SAVEFILE works OK
up to about 20k):
Code:

rem -- A test program to show SAVEFILE memory leak --
rem -- Loads Tlist with approx 40k of data and saves as mem_leak.dat
rem -- every 5 seconds. Shows available free memory at start of
rem -- operation, and monitors current free memory every second.

OPTION SCALE, 96

DIALOG CREATE,"SAVEFILE Memory leak Test",-1,-1,385,160
  DIALOG ADD,TEXT,CurrentStatus,8,5,,,""
  DIALOG ADD,TEXT,StartStatus,29,5,,,"Press 'Start' button to begin..."

  DIALOG ADD,BUTTON,Start,5,300,80,20
  DIALOG ADD,BUTTON,Stop,26,300,80,20

  DIALOG ADD,LIST,Tlist,50,5,375,100,
DIALOG SHOW

rem -- Put horizontal slider on list --
%x = @sendmsg(@winexists(~Tlist),$0194,2000,0)

rem -- Creat a list of useless info --
%x = 0
REPEAT
  LIST ADD, Tlist, @datetime(yyyy/mm/dd hh:nn am/pm) This is an example program to show the memory leak in VDS SAVEFILE operations.
  %x = @succ(%x)
UNTIL @greater(%x, 400)

%x = 0

:EVLOOP
  %x = @succ(%x)
  WAIT 1, EVENT
  goto @event()

:TIMER
  DIALOG SET, CurrentStatus, @datetime(hh:nn:ss am/pm)"  Current Free Memory - "@sysinfo(FREEMEM) kb
  rem -- Check every 5 seconds --
  if @greater(%x, 5)
     if @equal(%s, "start")
        DIALOG SET, CurrentStatus, @datetime(hh:nn:ss am/pm)"  Current Free Memory - "@sysinfo(FREEMEM) kb" Saving..."
        LIST SAVEFILE, Tlist, mem_leak.dat
     end
     %x = 0
  end
  goto EVLOOP

:StartBUTTON
  %s = "start"
  DIALOG SET, StartStatus, "Free Memory At "@datetime(hh:nn:ss am/pm)" Start - "@sysinfo(FREEMEM) kb
  goto EVLOOP

:StopBUTTON
  %s = "stop"
  DIALOG SET, StartStatus, "Press 'Start' button to begin..."
  goto EVLOOP

:CLOSE
  EXIT
  STOP

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Tommy
Admin Team


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

PostPosted: Tue Jan 08, 2002 11:23 pm    Post subject: Reply with quote

It still seems to leak, according to your script approx. 5 MB in 10 minutes. I think it's doubtful how meaningful such a result is though.

Tommy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Tue Jan 08, 2002 11:28 pm    Post subject: Reply with quote

It's real meaningful if your program constantly updates a log.
That's what prompted me to hunt down the problem in VDS3. Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Tommy
Admin Team


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

PostPosted: Wed Jan 09, 2002 12:31 am    Post subject: Reply with quote

Shouldn't you watch the amount of used/free memory in the swap file too then? Thinks may be moved over from and towards there...
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Wed Jan 09, 2002 12:44 am    Post subject: Reply with quote

__________________________________________________________________________________________________________________________
I've checked the size of the swap file and it shows zero
while the test program is running. I don't think Windows
should access it as long as there's plenty of free RAM.

My understanding is that the swap file is used last, because
the disk access speed is so much slower than RAM.

We're only using a 40k file here... Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
webdaddy
Contributor
Contributor


Joined: 14 Nov 2004
Posts: 151
Location: Raleigh NC

PostPosted: Fri May 09, 2008 6:21 pm    Post subject: Log Files Reply with quote

I ran into that before as well and had to reopen a new log BEFORE getting to the point as where A) my application came to a crawl and B) the system became unstable. I save the file and close the list and start again. I have had a few of my apps running in production at a company for months without a reboot not. Before it would need to be rebooted every 2 or 3 days.

WD

_________________
K Wetzel
Programming - Technology - Communications
"The Home of the SLC Security Console"
SLC now available for Linux...
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
JerryDee
Contributor
Contributor


Joined: 19 Oct 2005
Posts: 53
Location: Czech Republic

PostPosted: Sat May 10, 2008 8:42 pm    Post subject: Reply with quote

Ooooch, are you tracking six years old trace ?!?
_________________
Jerry
(VDS 4,5,6 Pro | V-Setup 3)
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 -> Bug Reports All times are GMT
Page 1 of 1

 
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