I don't think the issue is actually RAM, but the number of window "handlers" that are allowed in Windows. I'm sure I have the wrong word there, but I am trying to pull this up from memory from a post over a year ago. Basically, only X number of windows can be opened in Windows (in mIRC and other programs combined).

Anyhow, if you have that many windows open for a bot, my guess is that you're probably doing something you shouldn't be doing.