Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Help w/ Memory Leak (IanM's Matrix Utilties)

Author
Message
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 10th Jan 2009 18:51
I've been looking for week now and I can't seem to find the leak. I have narrowed it down to one function, which calls one other function; and this second function, I am fairly sure, does not contain the leak. I know this is the function because I removed it from being called and the leakage stopped. Any help would be appreciated.

The leaking function:


The whole program:



Open MMORPG: It's your game!
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 10th Jan 2009 21:22 Edited at: 10th Jan 2009 21:27
Quote: "I've been looking for week now"

You should have raised this a week ago then

It's the arglist stuff I'm afraid. It's not a bug in the code, but a bug in the design.

I've made a quick modification for now - it's now not possible to do the following:


This change shouldn't cause anyone any problems, as it's unlikely you'll want to run two arglists in parallel in the same function at the same stack level.

A replacement DLL is attached.

[EDIT]
I forgot to mention that I've temporarily added a debug function that allows you to track the depth of the arglist stack - DEBUG ARGLIST STACK SIZE() - before I made the change, the number this function was reporting was rolling up at quite a rate. After the change it stayed at 2.

Attachments

Login to view attachments
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 11th Jan 2009 01:51
Now I get an error:

Quote: "Could not determine parameter type of 'Open Arglist()' at line 74."


This comes up during compile.


Open MMORPG: It's your game!
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Jan 2009 11:30
No issues with the one I already have, so I've downloaded and installed the one I uploaded earlier - no issues there either.

Try the download again, or use this one where I've zipped the file up.

Attachments

Login to view attachments
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 11th Jan 2009 20:06
Works perfectly IanM! Thanks a ton.


Open MMORPG: It's your game!

Login to post a reply

Server time is: 2024-03-29 07:37:13
Your offset time is: 2024-03-29 07:37:13