| 07-28-2009, 07:24 PM | #1 |
Please read this . I also conducted my own test, the result was no handle increase. Can someone test for memory usage increase? I don't know how to do that myself. Thanks. test script:scope test initializer init globals group GROUP timer TIMER integer HANDLE_OFFSET integer TEST_N integer TEST_MAX=1000 endglobals private function StartTest takes nothing returns nothing call GroupEnumUnitsInRange(GROUP, 0, 0, 1000, null) set TEST_N=TEST_N+1 call TimerStart(TIMER, 0.01, TEST_N<TEST_MAX, function StartTest) endfunction private function DisplayTestResult takes nothing returns nothing local trigger t=CreateTrigger() local integer n=GetHandleId(t) call DestroyTrigger(t) set t=null call BJDebugMsg("HANDLE's created: "+I2S((n-HANDLE_OFFSET)+1)) endfunction private function init takes nothing returns nothing set GROUP=CreateGroup() set TIMER=CreateTimer() set HANDLE_OFFSET=GetHandleId(GROUP) set TEST_N=0 call TimerStart(TIMER, 2.5, false, function StartTest) call TimerStart(CreateTimer(), 5, false, function DisplayTestResult) endfunction endscope I'm sorry if this was already discussed here. |
| 07-28-2009, 07:32 PM | #2 |
As far i remember it doesn't leak handle references but the memory used by the process war3 grow up, so check that instead. |
| 07-28-2009, 07:33 PM | #3 | |
Yep, that's what I wanted to check, but I don't know how to accurately check that, I only got process explorer and I don't know how to really do that. Quote:
EDIT:I guess there's no more point in checking since whats increasing is warcraft's memory usage, not the handle count. The old tests are still valid I guess. Thanks Troll-Brain. |
| 07-28-2009, 10:54 PM | #4 |
You don't need an accurate test, just a "good" test, use chat message to start / end the enum like every 0.1 s. Start war3 , open process explorer, wait the stability of the process war3 (memory usage is stable), be sure war3 isn't paused, note the memory and launch the test, wait few minutes, end the test, wait few minutes again and compare the memory used with the previous one. |
| 07-29-2009, 02:34 AM | #5 |
Or you could make it do 1000 enums per second and see the memory usage skyrocket with no filter, and stay constant with a filter. |
