summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/commands.cpp18
-rw-r--r--src/dnsqueue.cpp18
-rw-r--r--src/helperfuncs.cpp10
-rw-r--r--src/inspircd.cpp18
-rw-r--r--src/modules.cpp19
-rw-r--r--src/xline.cpp17
6 files changed, 49 insertions, 51 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index 23d285eee..d1d28bd56 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -69,8 +69,8 @@ extern int kq;
#endif
extern int MODCOUNT;
-extern std::vector<Module*> modules;
-extern std::vector<ircd_module*> factory;
+extern std::vector<Module*, __single_client_alloc> modules;
+extern std::vector<ircd_module*, __single_client_alloc> factory;
extern int LogLevel;
extern char ServerName[MAXBUF];
@@ -100,7 +100,7 @@ extern bool nofork;
extern time_t TIME;
-extern std::vector<std::string> module_names;
+extern std::vector<std::string, __single_client_alloc> module_names;
extern char MyExecutable[1024];
extern int boundPortCount;
@@ -124,11 +124,11 @@ const long duration_d = duration_h * 24;
const long duration_w = duration_d * 7;
const long duration_y = duration_w * 52;
-typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> user_hash;
-typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp> chan_hash;
-typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp> address_cache;
-typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp> whowas_hash;
-typedef std::deque<command_t> command_table;
+typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> user_hash;
+typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> chan_hash;
+typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp, __single_client_alloc> address_cache;
+typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> whowas_hash;
+typedef std::deque<command_t, __single_client_alloc> command_table;
extern user_hash clientlist;
@@ -139,7 +139,7 @@ extern file_cache MOTD;
extern file_cache RULES;
extern address_cache IP;
-extern std::vector<userrec*> all_opers;
+extern std::vector<userrec*, __single_client_alloc> all_opers;
// This table references users by file descriptor.
// its an array to make it VERY fast, as all lookups are referenced
diff --git a/src/dnsqueue.cpp b/src/dnsqueue.cpp
index 1a5113618..90365b5dc 100644
--- a/src/dnsqueue.cpp
+++ b/src/dnsqueue.cpp
@@ -65,18 +65,18 @@ using namespace std;
extern int MaxWhoResults;
-extern std::vector<Module*> modules;
-extern std::vector<std::string> module_names;
-extern std::vector<ircd_module*> factory;
-extern std::vector<int> fd_reap;
+extern std::vector<Module*, __single_client_alloc> modules;
+extern std::vector<std::string, __single_client_alloc> module_names;
+extern std::vector<ircd_module*, __single_client_alloc> factory;
+extern std::vector<int, __single_client_alloc> fd_reap;
extern int MODCOUNT;
-typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> user_hash;
-typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp> chan_hash;
-typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp> address_cache;
-typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp> whowas_hash;
-typedef std::deque<command_t> command_table;
+typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> user_hash;
+typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> chan_hash;
+typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp, __single_client_alloc> address_cache;
+typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> whowas_hash;
+typedef std::deque<command_t, __single_client_alloc> command_table;
extern user_hash clientlist;
extern chan_hash chanlist;
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index 5649b6ca1..c99ffdcf8 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -51,7 +51,7 @@
using namespace std;
extern int MODCOUNT;
-extern std::vector<Module*> modules;
+extern std::vector<Module*, __single_client_alloc> modules;
extern time_t TIME;
extern bool nofork;
@@ -74,13 +74,13 @@ extern userrec* fd_ref_table[65536];
extern int statsAccept, statsRefused, statsUnknown, statsCollisions, statsDns, statsDnsGood, statsDnsBad, statsConnects, statsSent, statsRecv;
static char already_sent[65536];
-extern std::vector<userrec*> all_opers;
+extern std::vector<userrec*, __single_client_alloc> all_opers;
extern ClassVector Classes;
-typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> user_hash;
-typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp> chan_hash;
-typedef std::deque<command_t> command_table;
+typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> user_hash;
+typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> chan_hash;
+typedef std::deque<command_t, __single_client_alloc> command_table;
extern user_hash clientlist;
extern chan_hash chanlist;
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 4464be755..ccf91b6de 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -92,9 +92,9 @@ bool AllowHalfop = true;
bool AllowProtect = true;
bool AllowFounder = true;
-extern std::vector<Module*> modules;
-std::vector<std::string> module_names;
-extern std::vector<ircd_module*> factory;
+extern std::vector<Module*, __single_client_alloc> modules;
+std::vector<std::string, __single_client_alloc> module_names;
+extern std::vector<ircd_module*, __single_client_alloc> factory;
extern int MODCOUNT;
int openSockfd[MAXSOCKS];
@@ -107,11 +107,11 @@ time_t TIME = time(NULL), OLDTIME = time(NULL);
int kq, lkq, skq;
#endif
-typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> user_hash;
-typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp> chan_hash;
-typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp> address_cache;
-typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp> whowas_hash;
-typedef std::deque<command_t> command_table;
+typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> user_hash;
+typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> chan_hash;
+typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp, __single_client_alloc> address_cache;
+typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> whowas_hash;
+typedef std::deque<command_t, __single_client_alloc> command_table;
// This table references users by file descriptor.
// its an array to make it VERY fast, as all lookups are referenced
@@ -153,7 +153,7 @@ void AddWhoWas(userrec* u);
std::vector<long> auth_cookies;
std::stringstream config_f(stringstream::in | stringstream::out);
-std::vector<userrec*> all_opers;
+std::vector<userrec*, __single_client_alloc> all_opers;
char lowermap[255];
diff --git a/src/modules.cpp b/src/modules.cpp
index c0dcc3ca7..63c764bbb 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -59,8 +59,8 @@ extern int kq;
#endif
extern int MODCOUNT;
-extern std::vector<Module*> modules;
-extern std::vector<ircd_module*> factory;
+extern std::vector<Module*, __single_client_alloc> modules;
+extern std::vector<ircd_module*, __single_client_alloc> factory;
extern time_t TIME;
@@ -88,8 +88,7 @@ extern int NetBufferSize;
extern int MaxWhoResults;
extern time_t nb_start;
-extern std::vector<int> fd_reap;
-extern std::vector<std::string> module_names;
+extern std::vector<std::string, __single_client_alloc> module_names;
extern int boundPortCount;
extern int portCount;
@@ -106,11 +105,11 @@ extern FILE *log_file;
extern userrec* fd_ref_table[65536];
-typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> user_hash;
-typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp> chan_hash;
-typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp> address_cache;
-typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp> whowas_hash;
-typedef std::deque<command_t> command_table;
+typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> user_hash;
+typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> chan_hash;
+typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp, __single_client_alloc> address_cache;
+typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> whowas_hash;
+typedef std::deque<command_t, __single_client_alloc> command_table;
extern user_hash clientlist;
@@ -136,7 +135,7 @@ public:
ExtMode(char mc, int ty, bool oper, int p_on, int p_off) : modechar(mc), type(ty), needsoper(oper), params_when_on(p_on), params_when_off(p_off) { };
};
-typedef std::vector<ExtMode> ExtModeList;
+typedef std::vector<ExtMode, __single_client_alloc> ExtModeList;
typedef ExtModeList::iterator ExtModeListIter;
diff --git a/src/xline.cpp b/src/xline.cpp
index fa400d5c5..7e96d0940 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -50,8 +50,8 @@
using namespace std;
extern int MODCOUNT;
-extern std::vector<Module*> modules;
-extern std::vector<ircd_module*> factory;
+extern std::vector<Module*, __single_client_alloc> modules;
+extern std::vector<ircd_module*, __single_client_alloc> factory;
extern int LogLevel;
extern char ServerName[MAXBUF];
@@ -76,8 +76,7 @@ extern time_t startup_time;
extern int NetBufferSize;
extern time_t nb_start;
-extern std::vector<int> fd_reap;
-extern std::vector<std::string> module_names;
+extern std::vector<std::string, __single_client_alloc> module_names;
extern int boundPortCount;
extern int portCount;
@@ -92,11 +91,11 @@ extern serverrec* me[32];
extern FILE *log_file;
-typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> user_hash;
-typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp> chan_hash;
-typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp> address_cache;
-typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp> whowas_hash;
-typedef std::deque<command_t> command_table;
+typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> user_hash;
+typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> chan_hash;
+typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp, __single_client_alloc> address_cache;
+typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> whowas_hash;
+typedef std::deque<command_t, __single_client_alloc> command_table;
extern user_hash clientlist;