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 Issue Again :-(

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Rubes_sw
Valued Contributor
Valued Contributor


Joined: 11 Jun 2001
Posts: 625
Location: Northern Ireland

PostPosted: Wed Nov 20, 2002 9:44 pm    Post subject: Memory Leak Issue Again :-( Reply with quote

OK, i am trying to make a system where there is a program running on a Windows Server (maybe XP).

The client machines connect to this program with information etc. and the Server may send messages back to it.

I have tried using: vdsnet.dll - vdsinet.dll - vdsipp.dll

I have no lists in my programs, and i am not saving logs or anything so why i am using about 4 - 6 K every fews seconds on the server program. The server program needs to run: 24/7 - 365

I have tried this program and left it running for a few days and windows gets a message, There is insuffenicent memory to perform this operation, or something

Help

Rubes_sw
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 Nov 20, 2002 10:58 pm    Post subject: Reply with quote

Ya might post some of your code to give folks a better
idea of what you're doing... Wink

Did you check that you don't have a connection or
thread left open (or too many) when opening others?

I'm just guessing, some of the other guys will know
more about server stuff than I do. Confused

Cheers, Mac 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
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 766
Location: Eastman, GA

PostPosted: Wed Nov 20, 2002 11:22 pm    Post subject: Reply with quote

There may be a memory leak...but if your running a windows server your going to have those. The average windows server needs a reboot every 90 days or so...

Make that your goal. You will need to reboot anyway... 365/7 is not realistic. If you feel your proggie will severly bog down the server or it won't stay running for 90 days then post some code, we'll be more than happy to help! Laughing

I've been working with the vdsdll for a while, and I haven't had any major memory leak problems.
Back to top
View user's profile Send private message AIM Address
Rubes_sw
Valued Contributor
Valued Contributor


Joined: 11 Jun 2001
Posts: 625
Location: Northern Ireland

PostPosted: Thu Nov 21, 2002 11:29 am    Post subject: Reply with quote

I want to modify this code:

Code:

external vdsinet.dll,Public Freeware Key|90257236
  DIALOG CREATE,Chat,-1,0,592,385
  DIALOG ADD,GROUP,gGROUP1,10,480,110,169
  DIALOG ADD,GROUP,gGROUP2,262,10,466,100
  DIALOG ADD,LIST,lLINES,10,10,465,250
  DIALOG ADD,BUTTON,bALLSEND,15,485,100,24,All send,DEFAULT
  DIALOG ADD,BUTTON,bIPSEND,45,485,100,24,IP send
  DIALOG ADD,BUTTON,bIDSEND,70,485,100,24,ID send
  DIALOG ADD,BUTTON,bSERVERSEND,95,485,100,24,Server send
  DIALOG ADD,BUTTON,bIPKICK,125,485,100,24,IP Kick
  DIALOG ADD,BUTTON,bIDKICK,150,485,100,24,ID Kick
  DIALOG ADD,EDIT,eMESSAGE,270,75,393,19
  DIALOG ADD,EDIT,eIPID,290,75,393,19
  DIALOG ADD,EDIT,eIP,315,75,155,,@net(socket,addr)
  DIALOG ADD,EDIT,ePORT,335,75,155,19,888
  DIALOG ADD,BUTTON,bSERVER,315,240,110,20,Server
  DIALOG ADD,BUTTON,bCLIENT,315,358,110,20,Client
  DIALOG ADD,BUTTON,bDISCONNECT,340,240,228,15,Disconnect
  DIALOG ADD,TEXT,tMESSAGE,272,20,,,Message:
  DIALOG ADD,TEXT,tIPID,292,20,,,IP/ID:
  DIALOG ADD,TEXT,tIP,320,20,,,IP-adres:
  DIALOG ADD,TEXT,tPORT,340,20,,,Port:
  DIALOG ADD,STATUS,sSTATUS
  DIALOG DISABLE,tMESSAGE
  DIALOG DISABLE,tIPID
  DIALOG DISABLE,eMESSAGE
  DIALOG DISABLE,eIPID
  DIALOG DISABLE,bALLSEND
  DIALOG DISABLE,bIPSEND
  DIALOG DISABLE,bIDSEND
  DIALOG DISABLE,bSERVERSEND
  DIALOG DISABLE,bIPKICK
  DIALOG DISABLE,bIDKICK
  DIALOG SHOW
  net socket,auto,1
  net socket,vdsevents,
:evloop
  %E = @event()
  if %E
    goto %E
  end
  %E = @net(socket,event)
  if %E
    goto %E
  end
  goto evloop
:bSERVERBUTTON
  net socket,port,@dlgtext(ePORT)
  net socket,server
  dialog disable,bSERVER
  dialog disable,bCLIENT
  dialog disable,eIP
  dialog disable,ePORT
  dialog disable,tIP
  dialog disable,tPORT
  dialog enable,eMESSAGE
  dialog enable,eIPID
  dialog enable,tMESSAGE
  dialog enable,tIPID
  dialog enable,bALLSEND
  dialog enable,bIPSEND
  dialog enable,bIDSEND
  dialog disable,bSERVERSEND
  dialog enable,bIPKICK
  dialog enable,bIDKICK
  %B = 1
  repeat
    %A = @event()
  until @not(@equal(@net(socket,status),open))%A
  if %A
    goto %A
  end
  if @equal(@net(socket,status),listening)
    dialog set,sSTATUS,Listening: @net(socket,clients) clients.
  else
    goto closec
  end
  goto evloop
:bCLIENTBUTTON
  net socket,addr,@dlgtext(eIP)
  net socket,port,@dlgtext(ePORT)
  net socket,client
  %B =
  dialog set,sSTATUS,@net(socket,status)
  goto evloop
:bALLSENDBUTTON
  if @dlgtext(eMESSAGE)
    net socket,sendall,@dlgtext(eMESSAGE)
    dialog set,eMESSAGE
  end
  goto evloop
:bIPSENDBUTTON
  net socket,sendaddr,@dlgtext(eIPID),@dlgtext(eMESSAGE)
  dialog set,eMESSAGE
  goto evloop
:bIDSENDBUTTON
  net socket,sendid,@dlgtext(eIPID),@dlgtext(eMESSAGE)
  dialog set,eMESSAGE
  goto evloop
:bSERVERSENDBUTTON
  net socket,sendserver,@dlgtext(eMESSAGE)
  dialog set,eMESSAGE
  goto evloop
:bIPKICKBUTTON
  net socket,closecaddr,@dlgtext(eIPID)
  goto evloop
:bIDKICKBUTTON
  net socket,closecid,@dlgtext(eIPID)
  goto evloop
:bDISCONNECTBUTTON
  net socket,close
  goto closec
:NETWORK
  list add,lLINES,@net(socket,senderaddr):@net(socket,senderport) (id: @net(socket,senderid)) > @net(socket,data)
  list seek,lLINES,@pred(@count(lLINES))
  goto evloop
:CONNECT
  dialog set,sSTATUS,@net(socket,status)
  dialog disable,bSERVER
  dialog disable,bCLIENT
  dialog disable,eIP
  dialog disable,ePORT
  dialog disable,tIP
  dialog disable,tPORT
  dialog enable,eMESSAGE
  dialog enable,eIPID
  dialog enable,tMESSAGE
  dialog enable,tIPID
  dialog enable,bALLSEND
  dialog enable,bIPSEND
  dialog enable,bIDSEND
  dialog enable,bSERVERSEND
  dialog disable,bIPKICK
  dialog disable,bIDKICK
  goto evloop
:ACCEPT
  list add,lLINES,Connection accepted for @net(socket,senderaddr):@net(socket,senderport) (id: @net(socket,senderid)).
  list seek,lLINES,@pred(@count(lLINES))
  dialog set,sSTATUS,Listening: @net(socket,clients) clients.
  goto evloop
:CLOSEC
  if @equal(@net(socket,status),listening)
    list add,lLINES,@net(socket,senderaddr):@net(socket,senderport) (id: @net(socket,senderid)) closed connection.
    list seek,lLINES,@pred(@count(lLINES))
    dialog set,sSTATUS,Listening: @net(socket,clients) clients.
  else
    dialog set,sSTATUS,@net(socket,status)
    dialog enable,bSERVER
    dialog enable,bCLIENT
    dialog enable,eIP
    dialog enable,ePORT
    dialog enable,tIP
    dialog enable,tPORT
    dialog disable,eMESSAGE
    dialog disable,eIPID
    dialog disable,tMESSAGE
    dialog disable,tIPID
  end
  goto evloop
:ERROR
  net socket,close
  warn Network error: @net(socket,error)
  goto closec
:close


On windows Xp task manager, the memory used when this program is compiled keeps increaseing, about 10-30 K a second.

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


Joined: 10 May 2001
Posts: 789

PostPosted: Thu Nov 21, 2002 1:05 pm    Post subject: Reply with quote

Well I tried the socket.dsc example with vdsinet.dll and compiled it using VDS 4.5.

When I ran it with doing nothing, just starting it, SOCKET.EXE takes 98% of the CPU and the memory grows about 5-10K each second.

I personnaly think it maybe the DLL.


I tried the TCP server and TCP server examples with VDSIPP.DLL And I didnt see any leaks with that DLL. Do you have your example of the leak with VDSIPP?

I ran the examples on Windows 2000.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help 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