KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

kixtart mem usage not getting "resetted" on trashi

 
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion
View previous topic :: View next topic  
Author Message
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Thu Jun 17, 2004 11:10 am    Post subject: kixtart mem usage not getting "resetted" on trashi Reply with quote

shawn, how you explain this:
Code:
"starting the process..."
 getusage
"starting KF..."
$KFS = createobject("kixtart.system")
getusage
"Releasing KF..."
$KFS=0
getusage
? 'and the final outcome is: "what the heck is wasting our memory?"'

Function GetUsage(optional $shiat)
dim $objWMIService,$colItems,$objItem
 $objWMIService = GetObject("winmgmts:\\.\root\cimv2")
 $colItems = $objWMIService.ExecQuery("Select * from Win32_Process where processID=@pid",,48)
 For Each $objItem in $colItems
   $getusage = @crlf+"memory consumption: " + $objItem.WorkingSetSize+@crlf
 Next
if not $shiat sleep 1 $getusage=getusage(1) endif
EndFunction
get $


not really sure is it kixtart thing or KF thing but kinda frustrating...

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Thu Jun 17, 2004 12:18 pm    Post subject: Reply with quote

its a KF thing ... the Kixforms DLL creates two GLOBAL objects that are created when the DLL is first attached to your process, and killing the system object isn't enough to release them from memory. So basically the KF DLL is attached to your process for the duration of your script. Objects can come and go, but the global objects live until the script process terminates, at which point they are released.
Back to top
View user's profile Send private message
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Thu Jun 17, 2004 1:19 pm    Post subject: Reply with quote

k, can live with that.
I was also wondering that adding multiple references:
$KFS1=createobject(KFS)
$KFS2=createobject(KFS)
$KFS3=createobject(KFS)

did not affect the mem-usage, but that's probably a COM thing, right?
another weird thing (as a side-effect), kixtart uses around 2M of mem at start, once I use wmi, it goes up to 4M and stays there.

just wondering though.
using, 5+2+4 = 11M for bbchecker is quite much... quess we can live with that though Razz

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Thu Jun 17, 2004 2:15 pm    Post subject: Reply with quote

The Kixtart.System object is very small ... it's just used to instantiate other bigger objects. So the footprint is tiny.
Back to top
View user's profile Send private message
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Thu Jun 17, 2004 7:35 pm    Post subject: Reply with quote

is not tiny.
kixtart process without it = 2M, with it = 4M

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion 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 cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group