08.07.2013, 07:32
I read KyleSmith's original post over and over again to see if he's trying to say that there's a memory leak in this plugin somewhere, but I just cannot understand what people should conclude from the post.
But yes, a small leak of 30 bytes per function call where the function is called 10 times a minute will lead to 300 bytes leaked in a minute, 18000 bytes (~17.5kilobytes) in an hour, 422kilobytes a day. This is an example of something I forgot to free() during development lately (an allocation around 25-40 bytes depending on some other size).
What I'm trying to say that something leaking 2 whole gigabytes of memory is seriously bad. This is what some OSes limit their heap space at for a single program. I haven't seen such nonsense with any popular or semi-popular plugins released here (although mine on my own forums once did leak memory on every mysql_real_escape_string
).
A single "jump" from having 45mb allocated to having 60mb allocated on startup is likely associated either to the internals of the SA-MP server or some plugin such as the mentioned MapAndreas.
But yes, a small leak of 30 bytes per function call where the function is called 10 times a minute will lead to 300 bytes leaked in a minute, 18000 bytes (~17.5kilobytes) in an hour, 422kilobytes a day. This is an example of something I forgot to free() during development lately (an allocation around 25-40 bytes depending on some other size).
What I'm trying to say that something leaking 2 whole gigabytes of memory is seriously bad. This is what some OSes limit their heap space at for a single program. I haven't seen such nonsense with any popular or semi-popular plugins released here (although mine on my own forums once did leak memory on every mysql_real_escape_string
![Cheesy](images/smilies/biggrin.png)
A single "jump" from having 45mb allocated to having 60mb allocated on startup is likely associated either to the internals of the SA-MP server or some plugin such as the mentioned MapAndreas.