mIRC Homepage
Posted By: praetorian_ "No buffer space" Errors - 15/10/04 04:28 PM
I am really starting to get tired of getting these. I know for a fact that they are coming from mIRC.



The above image is a screenshot of a program I run called RainMeter. I took this screenshot a few months ago after recieving one of the "no buffer space available" messages. The histogram in the foreground (darker at the bottom) represents CPU usage and the one in the background (darker at the top) represents physical memory usage.

The sharp decrease in both histograms came after exiting mIRC after recieving one of the "no buffer space" errors. No other programs were closed.

This, coupled with the fact that every time i get an error (and subsequenty cannot visit websites or do anything using my connection), the errors stop when mIRC is exited, make it obvious to me that there is a major memory leak of some type in mIRC. It is also obvious that these errors are caused by something in one of my scripts because not everyone gets them.

The purpose of this post is to gather information from people who also recieve these errors in an effort to identify which commands/features are causing them.

I highly suspect hash tables. I started recieving the errors after making a theme system that stores the theme file in a hash table and references it with $hget on every themable event. I also noticed an increase in frequency of these errors after making some code that connected to a website at a 5 minute interval and stored the retrieved information in a hash table.

If you get "no buffer space available" errors, please reply with the following information:

  • Number of hash tables you usually have
  • The type and size (number of items) of the information contained in them
  • How often you read from/write to them
  • How often you exit/restart mIRC
  • How long it takes to recieve the error


Along with any other things you suspect may be the cause.

Also, if you use hash tables heavily and leave mIRC open for several weeks with NO errors, please post here so perhaps we can rule hash tables out.

PLEASE also list any DLLs you are using.
Posted By: starbucks_mafia Re: "No buffer space" Errors - 15/10/04 04:36 PM
It could be helpful to list any DLLs you're using since they're a common source of memory leaks.
Posted By: praetorian_ Re: "No buffer space" Errors - 15/10/04 04:44 PM
In reply to my own post:

I currently have three hash tables. One for my theme system (~130 items of varying length, some containing control codes), one for a typing speed thing (2 items, a $ticks value and a WPM value) and one for a protection profile thing I started but never finished (0 items).

The hash table for my theme system is loaded on start and referenced, as I said earlier, on every themable event. The WPM table is written to every milisecond with the current $ticks value and on input with the WPM value. The protection table is loaded when I join a channel if a "profile" for that channel exists (but only one such profile exists so it is empty 99% of the time)

I am forced to exit and restart mIRC every 12-24 hours due to the buffer errors.

Also, I am using no DLLs whatsoever.
Posted By: praetorian_ Re: "No buffer space" Errors - 15/10/04 04:46 PM
Thanks for pointing that out.
Posted By: DeeperID Re: "No buffer space" Errors - 15/10/04 08:36 PM
I have received this message as well in the past and in my situation it was a direct result of running too many mircs (or too many internet applications). There is some unclear information I heard recently about a 200 window count limit or something like that? Basically I was running 10-11 mircs on a machine with 1gb of ram. Needless to say with that much ram why would you get that message? Never the less, I would get this message every now and then and the only solution would be to close one of them and start it back up again. Once I started using multiserv I have yet to receive this message once *knocks on wood*.

There are very many other posts about this on these message boards of you search for them. I have posted to a few of them, some point towards the /save or /saveini commands. Once upon a time I had thought it to be attributed to a lot of DDE calls between the mircs. However, during this time I wasn't very much into hash tables so I believe that theory could be farse indeed... unless it can be attributed to many different things at the same time or single things and then nothing all at once... I am confused too o.O

Many have said that running too many internet applications can cause this error which I believe to be the case in most situations unless you talk about my main machine which i never turn off, never reboot and run the following internet applications (win2k sp4): aim, msn, kdx, outlook express (syncronizing 2 hotmail accounts, 1msn account and 3 pop3 accounts), myie2, 2 mircs, icq, apache (web server), rainlendar (with server syncronization enabled), file sharing (of course), dame ware, multiple remote desktop connection windows and winamp3 (usually playing internet streams). I have enough internet applications running on this box to replicate their theory 10 times over... however I have never once gotten that message on that box. On that system I do not use any mirc dlls and the only scripts I have loaded are self created and make one saveini or two upon connecting and shortly after that. I also have a socket bot running on one of the mircs and there is a very large hash table for that which records user nicknames, hostmasks, channel modes and who is on what channel. That socket bot is in plenty of channels with hundreds of users.
Posted By: alkahol1k Re: "No buffer space" Errors - 15/10/04 08:40 PM
I get buffer errors as well. The only dlls i use are moo.dll and cnick.dll. mirc 6.16.
Posted By: starbucks_mafia Re: "No buffer space" Errors - 15/10/04 11:40 PM
I'd be interested to know if you're using any sockets in your scripts. The 'No buffer space' errors are almost certainly coming from Winsock.
Posted By: praetorian_ Re: "No buffer space" Errors - 16/10/04 12:10 AM
None that are on a timer. My usage is pretty low, probably 1-2 a day (open sockets, that is). The errors are definitely coming from the winsock, however when it crashes memory usage is so high Im assuming the buffer error is due to lack of memory rather than lack of an available socket.

I just made a loop to /hadd and $hget 10,000 times, put it on a 1 second timer and let it run for about an hour. Memory usage jumped by about 20mb total and 3mb for that instance of mIRC, so Im not so sure the problem is with hash tables.
Posted By: alkahol1k Re: "No buffer space" Errors - 16/10/04 03:00 AM
I do use a tcp socket but i'm not certain if this msg only pops up when its connected or just myself.

so its either a dll im running or a my socket?
Posted By: zack Re: "No buffer space" Errors - 16/10/04 05:32 PM
It cannot be because of sockets because I receive the same errors and I never use sockets.
Posted By: Adrenalin Re: "No buffer space" Errors - 17/10/04 12:08 AM
Are you using Windows 9x ?
If yes.. Then you might try the codemastr solution
Posted By: nalAAlan Re: "No buffer space" Errors - 17/10/04 10:06 PM
What version number?
Posted By: Voice_of_Power Re: "No buffer space" Errors - 19/10/04 12:38 PM
I've never experienced these errors, but I'm posting because I do heavily use hash tables.

Currently, I have 21 hash tables loaded. Together they have a size of about 900 slots, and about 7 times as much items. Most of those items only contain a single integer value, but a lot of them have longer values. One of the tables belongs to a theme system, and is accessed on almost every event, 15 of the tables belong to an experimental stats script I wrote, and some of those are accessed even more often. The rest is mainly used for settings and are usually accessed when opening a dialog or something like that.

Seeing that my hash table "traffic" is rather intense at moments (I have experienced lag on occasion), but I haven't seen the error, I don't think hash tables are without question the cause (but ofcourse I'm not ruling them out).

I usually don't run mIRC for more than 15 hours, but sometimes I run it for several days, but I haven't experienced any increased lag.


DLL wise, MDX is usually loaded by several scripts, and sometimes a DLL for a specific function, which isn't loaded long. I don't use dock DLL's etc.


Hope that helped.
Posted By: Sephiroth_ Re: "No buffer space" Errors - 19/10/04 03:50 PM
i got this message only once - and i know why

because of a p2p client using ~5000 connections
Posted By: Sephiroth_ Re: "No buffer space" Errors - 20/10/04 03:21 AM
*add
i can't edit my old post so posting something new wink
winxp sp2 has a limit for HALF OPEN connections which SP1 doesn't have - the limit is 10 - there is somewhere a small programm to change this to 50 (default) or to a number you want (but that isn't needed normally wink)

this limit is there to prevent DDoS attacks
Posted By: Voice_of_Power Re: "No buffer space" Errors - 20/10/04 10:09 AM
To add: that limit is per-second, not absolute

I don't see any connection to this error...
© mIRC Discussion Forums