summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaruna <haru@dotalux.com>2015-10-19 20:23:22 +0200
committerHaruna <haru@dotalux.com>2015-10-19 20:23:22 +0200
commitcffb68c6ee66227327e128f86cde8aa843e273d6 (patch)
tree3a8fb83f5c01ff26fa2efb53377f4255d093b00b
parentb320fdc7451c8643971a8b17c84ec777f9d7ecdf (diff)
parente625d7f186f104316031a39438bf644c67b1f4c4 (diff)
downloadhercules-cffb68c6ee66227327e128f86cde8aa843e273d6.tar.gz
hercules-cffb68c6ee66227327e128f86cde8aa843e273d6.tar.bz2
hercules-cffb68c6ee66227327e128f86cde8aa843e273d6.tar.xz
hercules-cffb68c6ee66227327e128f86cde8aa843e273d6.zip
Merge pull request #804 from 4144/memmanager
Fix reallocating memory without memory manager.
-rw-r--r--Hercules.xcodeproj/project.pbxproj24
-rw-r--r--src/char/HPMchar.c2
-rw-r--r--src/char/char.c2
-rw-r--r--src/char/geoip.c2
-rw-r--r--src/char/int_auction.c2
-rw-r--r--src/char/int_elemental.c2
-rw-r--r--src/char/int_guild.c2
-rw-r--r--src/char/int_homun.c2
-rw-r--r--src/char/int_mail.c2
-rw-r--r--src/char/int_mercenary.c2
-rw-r--r--src/char/int_party.c2
-rw-r--r--src/char/int_pet.c2
-rw-r--r--src/char/int_quest.c2
-rw-r--r--src/char/int_storage.c2
-rw-r--r--src/char/inter.c2
-rw-r--r--src/common/HPM.c2
-rw-r--r--src/common/Makefile.in8
-rw-r--r--src/common/console.c2
-rw-r--r--src/common/core.c2
-rw-r--r--src/common/db.c2
-rw-r--r--src/common/ers.c2
-rw-r--r--src/common/grfio.c2
-rw-r--r--src/common/memmgr.c (renamed from src/common/malloc.c)52
-rw-r--r--src/common/memmgr.h (renamed from src/common/malloc.h)0
-rw-r--r--src/common/mutex.c2
-rw-r--r--src/common/socket.c2
-rw-r--r--src/common/sql.c2
-rw-r--r--src/common/strlib.c2
-rw-r--r--src/common/sysinfo.c2
-rw-r--r--src/common/thread.c2
-rw-r--r--src/common/timer.c2
-rw-r--r--src/login/HPMlogin.c2
-rw-r--r--src/login/account_sql.c2
-rw-r--r--src/login/login.c2
-rw-r--r--src/map/HPMmap.c2
-rw-r--r--src/map/atcommand.c2
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/battleground.c2
-rw-r--r--src/map/channel.c2
-rw-r--r--src/map/chat.c2
-rw-r--r--src/map/chrif.c2
-rw-r--r--src/map/clif.c2
-rw-r--r--src/map/elemental.c2
-rw-r--r--src/map/guild.c2
-rw-r--r--src/map/homunculus.c2
-rw-r--r--src/map/instance.c2
-rw-r--r--src/map/intif.c2
-rw-r--r--src/map/irc-bot.c2
-rw-r--r--src/map/itemdb.c2
-rw-r--r--src/map/map.c2
-rw-r--r--src/map/mapreg_sql.c2
-rw-r--r--src/map/mercenary.c2
-rw-r--r--src/map/mob.c2
-rw-r--r--src/map/npc.c2
-rw-r--r--src/map/npc_chat.c2
-rw-r--r--src/map/party.c2
-rw-r--r--src/map/path.c2
-rw-r--r--src/map/pc.c2
-rw-r--r--src/map/pc_groups.c2
-rw-r--r--src/map/pet.c2
-rw-r--r--src/map/quest.c2
-rw-r--r--src/map/script.c2
-rw-r--r--src/map/searchstore.c2
-rw-r--r--src/map/skill.c2
-rw-r--r--src/map/status.c2
-rw-r--r--src/map/storage.c2
-rw-r--r--src/map/unit.c2
-rw-r--r--src/plugins/HPMHooking.c4
-rw-r--r--src/plugins/db2sql.c2
-rw-r--r--src/plugins/sample.c2
-rw-r--r--src/tool/mapcache.c2
-rw-r--r--vcproj-10/char-server.vcxproj4
-rw-r--r--vcproj-10/char-server.vcxproj.filters4
-rw-r--r--vcproj-10/login-server.vcxproj4
-rw-r--r--vcproj-10/login-server.vcxproj.filters4
-rw-r--r--vcproj-10/map-server.vcxproj4
-rw-r--r--vcproj-10/map-server.vcxproj.filters4
-rw-r--r--vcproj-10/mapcache.vcxproj4
-rw-r--r--vcproj-10/mapcache.vcxproj.filters4
-rw-r--r--vcproj-11/char-server.vcxproj4
-rw-r--r--vcproj-11/char-server.vcxproj.filters4
-rw-r--r--vcproj-11/login-server.vcxproj4
-rw-r--r--vcproj-11/login-server.vcxproj.filters4
-rw-r--r--vcproj-11/map-server.vcxproj4
-rw-r--r--vcproj-11/map-server.vcxproj.filters4
-rw-r--r--vcproj-11/mapcache.vcxproj4
-rw-r--r--vcproj-11/mapcache.vcxproj.filters4
-rw-r--r--vcproj-12/char-server.vcxproj4
-rw-r--r--vcproj-12/char-server.vcxproj.filters4
-rw-r--r--vcproj-12/login-server.vcxproj4
-rw-r--r--vcproj-12/login-server.vcxproj.filters4
-rw-r--r--vcproj-12/map-server.vcxproj4
-rw-r--r--vcproj-12/map-server.vcxproj.filters4
-rw-r--r--vcproj-12/mapcache.vcxproj4
-rw-r--r--vcproj-12/mapcache.vcxproj.filters4
-rw-r--r--vcproj-14/char-server.vcxproj4
-rw-r--r--vcproj-14/char-server.vcxproj.filters4
-rw-r--r--vcproj-14/login-server.vcxproj4
-rw-r--r--vcproj-14/login-server.vcxproj.filters4
-rw-r--r--vcproj-14/map-server.vcxproj4
-rw-r--r--vcproj-14/map-server.vcxproj.filters4
-rw-r--r--vcproj-14/mapcache.vcxproj4
-rw-r--r--vcproj-14/mapcache.vcxproj.filters4
103 files changed, 198 insertions, 150 deletions
diff --git a/Hercules.xcodeproj/project.pbxproj b/Hercules.xcodeproj/project.pbxproj
index 1472c088a..07967e965 100644
--- a/Hercules.xcodeproj/project.pbxproj
+++ b/Hercules.xcodeproj/project.pbxproj
@@ -11,7 +11,7 @@
A5380CD81856CE8A0090CBC4 /* console.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC692185643BB009EB79C /* console.c */; };
A5380CD91856CF4A0090CBC4 /* core.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC694185643BB009EB79C /* core.c */; };
A5380CDA1856D0650090CBC4 /* socket.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6BA185643BB009EB79C /* socket.c */; };
- A5380CDB1856D0690090CBC4 /* malloc.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A3185643BB009EB79C /* malloc.c */; };
+ A5380CDB1856D0690090CBC4 /* memmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A3185643BB009EB79C /* memmgr.c */; };
A5467AD31A16FCB4008AFAA6 /* loginif.c in Sources */ = {isa = PBXBuildFile; fileRef = A5467AD11A16FCB4008AFAA6 /* loginif.c */; };
A5467AD61A16FCDC008AFAA6 /* mapif.c in Sources */ = {isa = PBXBuildFile; fileRef = A5467AD41A16FCDC008AFAA6 /* mapif.c */; };
A5467AD91A16FD08008AFAA6 /* geoip.c in Sources */ = {isa = PBXBuildFile; fileRef = A5467AD71A16FD08008AFAA6 /* geoip.c */; };
@@ -50,9 +50,9 @@
A56CC6E1185643BB009EB79C /* HPM.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A0185643BB009EB79C /* HPM.c */; };
A56CC6E2185643BB009EB79C /* HPM.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A0185643BB009EB79C /* HPM.c */; };
A56CC6E3185643BB009EB79C /* HPM.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A0185643BB009EB79C /* HPM.c */; };
- A56CC6E4185643BB009EB79C /* malloc.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A3185643BB009EB79C /* malloc.c */; };
- A56CC6E5185643BB009EB79C /* malloc.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A3185643BB009EB79C /* malloc.c */; };
- A56CC6E6185643BB009EB79C /* malloc.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A3185643BB009EB79C /* malloc.c */; };
+ A56CC6E4185643BB009EB79C /* memmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A3185643BB009EB79C /* memmgr.c */; };
+ A56CC6E5185643BB009EB79C /* memmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A3185643BB009EB79C /* memmgr.c */; };
+ A56CC6E6185643BB009EB79C /* memmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A3185643BB009EB79C /* memmgr.c */; };
A56CC6E7185643BB009EB79C /* mapindex.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A5185643BB009EB79C /* mapindex.c */; };
A56CC6E8185643BB009EB79C /* mapindex.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A5185643BB009EB79C /* mapindex.c */; };
A56CC6E9185643BB009EB79C /* mapindex.c in Sources */ = {isa = PBXBuildFile; fileRef = A56CC6A5185643BB009EB79C /* mapindex.c */; };
@@ -256,8 +256,8 @@
A56CC6A0185643BB009EB79C /* HPM.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = HPM.c; path = src/common/HPM.c; sourceTree = "<group>"; };
A56CC6A1185643BB009EB79C /* HPM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HPM.h; path = src/common/HPM.h; sourceTree = "<group>"; };
A56CC6A2185643BB009EB79C /* HPMi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HPMi.h; path = src/common/HPMi.h; sourceTree = "<group>"; };
- A56CC6A3185643BB009EB79C /* malloc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = malloc.c; path = src/common/malloc.c; sourceTree = "<group>"; };
- A56CC6A4185643BB009EB79C /* malloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = malloc.h; path = src/common/malloc.h; sourceTree = "<group>"; };
+ A56CC6A3185643BB009EB79C /* memmgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = memmgr.c; path = src/common/memmgr.c; sourceTree = "<group>"; };
+ A56CC6A4185643BB009EB79C /* memmgr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = memmgr.h; path = src/common/memmgr.h; sourceTree = "<group>"; };
A56CC6A5185643BB009EB79C /* mapindex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mapindex.c; path = src/common/mapindex.c; sourceTree = "<group>"; };
A56CC6A6185643BB009EB79C /* mapindex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mapindex.h; path = src/common/mapindex.h; sourceTree = "<group>"; };
A56CC6A7185643BB009EB79C /* md5calc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = md5calc.c; path = src/common/md5calc.c; sourceTree = "<group>"; };
@@ -719,8 +719,8 @@
A56CC6A0185643BB009EB79C /* HPM.c */,
A56CC6A1185643BB009EB79C /* HPM.h */,
A56CC6A2185643BB009EB79C /* HPMi.h */,
- A56CC6A3185643BB009EB79C /* malloc.c */,
- A56CC6A4185643BB009EB79C /* malloc.h */,
+ A56CC6A3185643BB009EB79C /* memmgr.c */,
+ A56CC6A4185643BB009EB79C /* memmgr.h */,
A56CC6A5185643BB009EB79C /* mapindex.c */,
A56CC6A6185643BB009EB79C /* mapindex.h */,
A56CC6A7185643BB009EB79C /* md5calc.c */,
@@ -1170,7 +1170,7 @@
A5380CDA1856D0650090CBC4 /* socket.c in Sources */,
A55AED7C1B8153F100149CF8 /* scanner.c in Sources */,
A58A5A17185800A40099683E /* showmsg.c in Sources */,
- A5380CDB1856D0690090CBC4 /* malloc.c in Sources */,
+ A5380CDB1856D0690090CBC4 /* memmgr.c in Sources */,
A55AED7B1B8153EF00149CF8 /* scanctx.c in Sources */,
A55AED791B8153EA00149CF8 /* grammar.c in Sources */,
A55AED7D1B8153F300149CF8 /* strbuf.c in Sources */,
@@ -1208,7 +1208,7 @@
A56CC72E18564C05009EB79C /* grammar.c in Sources */,
A56CC705185643BB009EB79C /* socket.c in Sources */,
A56CC68918564387009EB79C /* account_sql.c in Sources */,
- A56CC6E4185643BB009EB79C /* malloc.c in Sources */,
+ A56CC6E4185643BB009EB79C /* memmgr.c in Sources */,
A56CC6E1185643BB009EB79C /* HPM.c in Sources */,
A56CC6FF185643BB009EB79C /* random.c in Sources */,
A56CC73418564C05009EB79C /* scanctx.c in Sources */,
@@ -1241,7 +1241,7 @@
A5B894AD1A03CDFA005AD22E /* HPMchar.c in Sources */,
A56CC761185657D9009EB79C /* int_homun.c in Sources */,
A56CC6FA185643BB009EB79C /* nullpo.c in Sources */,
- A56CC6E5185643BB009EB79C /* malloc.c in Sources */,
+ A56CC6E5185643BB009EB79C /* memmgr.c in Sources */,
A56CC6E2185643BB009EB79C /* HPM.c in Sources */,
A56CC765185657D9009EB79C /* int_pet.c in Sources */,
A56CC769185657D9009EB79C /* pincode.c in Sources */,
@@ -1314,7 +1314,7 @@
A56CC7D318565812009EB79C /* path.c in Sources */,
A56CC7C218565812009EB79C /* elemental.c in Sources */,
A56CC6FB185643BB009EB79C /* nullpo.c in Sources */,
- A56CC6E6185643BB009EB79C /* malloc.c in Sources */,
+ A56CC6E6185643BB009EB79C /* memmgr.c in Sources */,
A56CC7D418565812009EB79C /* pc_groups.c in Sources */,
A56CC6E3185643BB009EB79C /* HPM.c in Sources */,
A56CC7DD18565812009EB79C /* trade.c in Sources */,
diff --git a/src/char/HPMchar.c b/src/char/HPMchar.c
index d3150bc11..99e7c598f 100644
--- a/src/char/HPMchar.c
+++ b/src/char/HPMchar.c
@@ -31,7 +31,7 @@
#include "common/db.h"
#include "common/des.h"
#include "common/ers.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mapindex.h"
#include "common/mmo.h"
#include "common/nullpo.h"
diff --git a/src/char/char.c b/src/char/char.c
index 1e0428a3d..7cc6aa91a 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -29,7 +29,7 @@
#include "common/console.h"
#include "common/core.h"
#include "common/db.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mapindex.h"
#include "common/mmo.h"
#include "common/nullpo.h"
diff --git a/src/char/geoip.c b/src/char/geoip.c
index 65bb2bdd4..924c1cd83 100644
--- a/src/char/geoip.c
+++ b/src/char/geoip.c
@@ -7,7 +7,7 @@
#include "geoip.h"
#include "common/cbasetypes.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/showmsg.h"
#include <errno.h>
diff --git a/src/char/int_auction.c b/src/char/int_auction.c
index 67c83ca22..48bf715f2 100644
--- a/src/char/int_auction.c
+++ b/src/char/int_auction.c
@@ -12,7 +12,7 @@
#include "char/mapif.h"
#include "common/cbasetypes.h"
#include "common/db.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
diff --git a/src/char/int_elemental.c b/src/char/int_elemental.c
index e7708179a..3969e5e43 100644
--- a/src/char/int_elemental.c
+++ b/src/char/int_elemental.c
@@ -9,7 +9,7 @@
#include "char/char.h"
#include "char/inter.h"
#include "char/mapif.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index 54355161d..239e8a296 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -12,7 +12,7 @@
#include "char/mapif.h"
#include "common/cbasetypes.h"
#include "common/db.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
diff --git a/src/char/int_homun.c b/src/char/int_homun.c
index be72ecd58..78b4dbb61 100644
--- a/src/char/int_homun.c
+++ b/src/char/int_homun.c
@@ -9,7 +9,7 @@
#include "char/char.h"
#include "char/inter.h"
#include "char/mapif.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
diff --git a/src/char/int_mail.c b/src/char/int_mail.c
index 854fe31b1..933856b14 100644
--- a/src/char/int_mail.c
+++ b/src/char/int_mail.c
@@ -9,7 +9,7 @@
#include "char/char.h"
#include "char/inter.h"
#include "char/mapif.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
diff --git a/src/char/int_mercenary.c b/src/char/int_mercenary.c
index dd40a0224..fb98161fe 100644
--- a/src/char/int_mercenary.c
+++ b/src/char/int_mercenary.c
@@ -10,7 +10,7 @@
#include "char/inter.h"
#include "char/mapif.h"
#include "common/cbasetypes.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
diff --git a/src/char/int_party.c b/src/char/int_party.c
index aedcb8535..d4af67eb3 100644
--- a/src/char/int_party.c
+++ b/src/char/int_party.c
@@ -11,7 +11,7 @@
#include "char/mapif.h"
#include "common/cbasetypes.h"
#include "common/db.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mapindex.h"
#include "common/mmo.h"
#include "common/nullpo.h"
diff --git a/src/char/int_pet.c b/src/char/int_pet.c
index 97b2fb6a4..37e238725 100644
--- a/src/char/int_pet.c
+++ b/src/char/int_pet.c
@@ -9,7 +9,7 @@
#include "char/char.h"
#include "char/inter.h"
#include "char/mapif.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
diff --git a/src/char/int_quest.c b/src/char/int_quest.c
index fcd56230b..e2ee3401a 100644
--- a/src/char/int_quest.c
+++ b/src/char/int_quest.c
@@ -10,7 +10,7 @@
#include "char/inter.h"
#include "char/mapif.h"
#include "common/cbasetypes.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
diff --git a/src/char/int_storage.c b/src/char/int_storage.c
index 3a8a6a169..c0cae5300 100644
--- a/src/char/int_storage.c
+++ b/src/char/int_storage.c
@@ -10,7 +10,7 @@
#include "char/char.h"
#include "char/inter.h"
#include "char/mapif.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
diff --git a/src/char/inter.c b/src/char/inter.c
index 65048a9f9..1ed29719e 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -21,7 +21,7 @@
#include "char/mapif.h"
#include "common/cbasetypes.h"
#include "common/db.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
diff --git a/src/common/HPM.c b/src/common/HPM.c
index 5373c8b6a..7d9a0b104 100644
--- a/src/common/HPM.c
+++ b/src/common/HPM.c
@@ -11,7 +11,7 @@
#include "common/console.h"
#include "common/core.h"
#include "common/db.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mapindex.h"
#include "common/mmo.h"
#include "common/showmsg.h"
diff --git a/src/common/Makefile.in b/src/common/Makefile.in
index 208d3b111..88e991651 100644
--- a/src/common/Makefile.in
+++ b/src/common/Makefile.in
@@ -27,12 +27,12 @@ COMMON_SHARED_C = conf.c db.c des.c ers.c grfio.c HPM.c mapindex.c md5calc.c \
COMMON_C = $(COMMON_SHARED_C)
COMMON_SHARED_OBJ = $(patsubst %.c,%.o,$(COMMON_SHARED_C))
COMMON_OBJ = $(addprefix obj_all/, $(COMMON_SHARED_OBJ) \
- console.o core.o malloc.o socket.o)
+ console.o core.o memmgr.o socket.o)
COMMON_MINI_OBJ = $(addprefix obj_all/, $(COMMON_SHARED_OBJ) \
- miniconsole.o minicore.o minimalloc.o minisocket.o)
-COMMON_C += console.c core.c malloc.c socket.c
+ miniconsole.o minicore.o minimemmgr.o minisocket.o)
+COMMON_C += console.c core.c memmgr.c socket.c
COMMON_H = atomic.h cbasetypes.h conf.h console.h core.h db.h des.h ers.h \
- grfio.h hercules.h HPM.h HPMi.h malloc.h mapindex.h md5calc.h \
+ grfio.h hercules.h HPM.h HPMi.h memmgr.h mapindex.h md5calc.h \
mmo.h mutex.h nullpo.h random.h showmsg.h socket.h spinlock.h \
sql.h strlib.h sysinfo.h thread.h timer.h utils.h winapi.h
diff --git a/src/common/console.c b/src/common/console.c
index c8ca4ae87..f4f18b799 100644
--- a/src/common/console.c
+++ b/src/common/console.c
@@ -16,7 +16,7 @@
#ifndef MINICORE
# include "common/atomic.h"
# include "common/ers.h"
-# include "common/malloc.h"
+# include "common/memmgr.h"
# include "common/mutex.h"
# include "common/spinlock.h"
# include "common/sql.h"
diff --git a/src/common/core.c b/src/common/core.c
index 8564b8acc..6f21f526b 100644
--- a/src/common/core.c
+++ b/src/common/core.c
@@ -10,7 +10,7 @@
#include "common/cbasetypes.h"
#include "common/console.h"
#include "common/db.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/random.h"
#include "common/showmsg.h"
diff --git a/src/common/db.c b/src/common/db.c
index 4df5c08db..0600be2e8 100644
--- a/src/common/db.c
+++ b/src/common/db.c
@@ -73,7 +73,7 @@
#include "db.h"
#include "common/ers.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/showmsg.h"
#include "common/strlib.h"
diff --git a/src/common/ers.c b/src/common/ers.c
index 91fc6ccfb..bf17e087d 100644
--- a/src/common/ers.c
+++ b/src/common/ers.c
@@ -45,7 +45,7 @@
#include "ers.h"
#include "common/cbasetypes.h"
-#include "common/malloc.h" // CREATE, RECREATE, aMalloc, aFree
+#include "common/memmgr.h" // CREATE, RECREATE, aMalloc, aFree
#include "common/nullpo.h"
#include "common/showmsg.h" // ShowMessage, ShowError, ShowFatalError, CL_BOLD, CL_NORMAL
diff --git a/src/common/grfio.c b/src/common/grfio.c
index b59c2b63d..46804ea08 100644
--- a/src/common/grfio.c
+++ b/src/common/grfio.c
@@ -8,7 +8,7 @@
#include "common/cbasetypes.h"
#include "common/des.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
#include "common/strlib.h"
diff --git a/src/common/malloc.c b/src/common/memmgr.c
index 63de90cb3..0d9305b06 100644
--- a/src/common/malloc.c
+++ b/src/common/memmgr.c
@@ -4,7 +4,7 @@
#define HERCULES_CORE
-#include "malloc.h"
+#include "memmgr.h"
#include "common/cbasetypes.h"
#include "common/core.h"
@@ -79,6 +79,26 @@ struct malloc_interface *iMalloc;
#endif
+#ifndef USE_MEMMGR
+
+#ifdef __APPLE__
+#include <malloc/malloc.h>
+#define BUFFER_SIZE(ptr) malloc_size(ptr)
+#elif __FreeBSD__
+#include <malloc_np.h>
+#define BUFFER_SIZE(ptr) malloc_usable_size(ptr)
+#elif defined __linux__ || defined __linux || defined CYGWIN
+#include <malloc.h>
+#define BUFFER_SIZE(ptr) malloc_usable_size(ptr)
+#elif defined WIN32
+#include <malloc.h>
+#define BUFFER_SIZE(ptr) _msize(ptr)
+#else
+#error Unsupported OS
+#endif
+
+#endif
+
void* aMalloc_(size_t size, const char *file, int line, const char *func)
{
void *ret = MALLOC(size, file, line, func);
@@ -110,6 +130,34 @@ void* aRealloc_(void *p, size_t size, const char *file, int line, const char *fu
}
return ret;
}
+
+void* aReallocz_(void *p, size_t size, const char *file, int line, const char *func)
+{
+ void *ret;
+ // ShowMessage("%s:%d: in func %s: aReallocz %p %ld\n",file,line,func,p,size);
+#ifdef USE_MEMMGR
+ ret = REALLOC(p, size, file, line, func);
+#else
+ size_t newSize;
+ if (p) {
+ size_t oldSize = malloc_usable_size(p);
+ ret = REALLOC(p, size, file, line, func);
+ newSize = BUFFER_SIZE(ret);
+ if (ret && newSize > oldSize)
+ memset(ret + oldSize, 0, newSize - oldSize);
+ } else {
+ ret = REALLOC(p, size, file, line, func);
+ if (ret)
+ memset(ret, 0, BUFFER_SIZE(ret));
+ }
+#endif
+ if (ret == NULL){
+ ShowFatalError("%s:%d: in func %s: aRealloc error out of memory!\n",file,line,func);
+ exit(EXIT_FAILURE);
+ }
+ return ret;
+}
+
char* aStrdup_(const char *p, const char *file, int line, const char *func)
{
char *ret = STRDUP(p, file, line, func);
@@ -888,7 +936,7 @@ void malloc_defaults(void) {
iMalloc->malloc = aMalloc_;
iMalloc->calloc = aCalloc_;
iMalloc->realloc = aRealloc_;
- iMalloc->reallocz = aRealloc_;/* not using memory manager huhum o.o perhaps we could still do something about */
+ iMalloc->reallocz = aReallocz_;/* not using memory manager huhum o.o perhaps we could still do something about */
iMalloc->astrdup = aStrdup_;
iMalloc->free = aFree_;
#endif
diff --git a/src/common/malloc.h b/src/common/memmgr.h
index b194c7cf3..b194c7cf3 100644
--- a/src/common/malloc.h
+++ b/src/common/memmgr.h
diff --git a/src/common/mutex.c b/src/common/mutex.c
index 715609628..af1a6d155 100644
--- a/src/common/mutex.c
+++ b/src/common/mutex.c
@@ -6,7 +6,7 @@
#include "mutex.h"
#include "common/cbasetypes.h" // for WIN32
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/showmsg.h"
#include "common/timer.h"
diff --git a/src/common/socket.c b/src/common/socket.c
index b4b67da40..b418a468f 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -10,7 +10,7 @@
#include "common/HPM.h"
#include "common/cbasetypes.h"
#include "common/db.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
diff --git a/src/common/sql.c b/src/common/sql.c
index ee759eb61..4262a10a1 100644
--- a/src/common/sql.c
+++ b/src/common/sql.c
@@ -7,7 +7,7 @@
#include "sql.h"
#include "common/cbasetypes.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/showmsg.h"
#include "common/strlib.h"
#include "common/timer.h"
diff --git a/src/common/strlib.c b/src/common/strlib.c
index fcd1b483b..fefabe52b 100644
--- a/src/common/strlib.c
+++ b/src/common/strlib.c
@@ -7,7 +7,7 @@
#include "strlib.h"
#include "common/cbasetypes.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/showmsg.h"
#include <errno.h>
diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c
index d218e6e99..1baf33086 100644
--- a/src/common/sysinfo.c
+++ b/src/common/sysinfo.c
@@ -10,7 +10,7 @@
#include "common/cbasetypes.h"
#include "common/core.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/strlib.h"
#include <stdio.h> // fopen
diff --git a/src/common/thread.c b/src/common/thread.c
index d5bbd7f97..d9cd42aa6 100644
--- a/src/common/thread.c
+++ b/src/common/thread.c
@@ -11,7 +11,7 @@
#include "thread.h"
#include "common/cbasetypes.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/showmsg.h"
#include "common/sysinfo.h" // sysinfo->getpagesize()
diff --git a/src/common/timer.c b/src/common/timer.c
index f6ce00d54..f31ae0ffe 100644
--- a/src/common/timer.c
+++ b/src/common/timer.c
@@ -8,7 +8,7 @@
#include "common/cbasetypes.h"
#include "common/db.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/showmsg.h"
#include "common/utils.h"
diff --git a/src/login/HPMlogin.c b/src/login/HPMlogin.c
index b900f28fe..5ceb38283 100644
--- a/src/login/HPMlogin.c
+++ b/src/login/HPMlogin.c
@@ -17,7 +17,7 @@
#include "common/db.h"
#include "common/des.h"
#include "common/ers.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
diff --git a/src/login/account_sql.c b/src/login/account_sql.c
index 37837fc35..4efa73e94 100644
--- a/src/login/account_sql.c
+++ b/src/login/account_sql.c
@@ -9,7 +9,7 @@
#include "common/cbasetypes.h"
#include "common/console.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
diff --git a/src/login/login.c b/src/login/login.c
index 1d8ef489a..3ec60f0aa 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -15,7 +15,7 @@
#include "common/conf.h"
#include "common/core.h"
#include "common/db.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/md5calc.h"
#include "common/nullpo.h"
#include "common/random.h"
diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c
index edbe74039..ade685bf7 100644
--- a/src/map/HPMmap.c
+++ b/src/map/HPMmap.c
@@ -15,7 +15,7 @@
#include "common/db.h"
#include "common/des.h"
#include "common/ers.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mapindex.h"
#include "common/mmo.h"
#include "common/nullpo.h"
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 15422a74a..ff88f2c63 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -41,7 +41,7 @@
#include "common/cbasetypes.h"
#include "common/conf.h"
#include "common/core.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h" // MAX_CARTS
#include "common/nullpo.h"
#include "common/random.h"
diff --git a/src/map/battle.c b/src/map/battle.c
index 5b147de9c..1f9d75a64 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -26,7 +26,7 @@
#include "common/HPM.h"
#include "common/cbasetypes.h"
#include "common/ers.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/nullpo.h"
#include "common/random.h"
#include "common/showmsg.h"
diff --git a/src/map/battleground.c b/src/map/battleground.c
index be6b7a863..cc5384d21 100644
--- a/src/map/battleground.c
+++ b/src/map/battleground.c
@@ -21,7 +21,7 @@
#include "common/cbasetypes.h"
#include "common/conf.h"
#include "common/HPM.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
#include "common/socket.h"
diff --git a/src/map/channel.c b/src/map/channel.c
index 196e5f770..023d22c06 100644
--- a/src/map/channel.c
+++ b/src/map/channel.c
@@ -14,7 +14,7 @@
#include "common/cbasetypes.h"
#include "common/conf.h"
#include "common/db.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/nullpo.h"
#include "common/random.h"
#include "common/showmsg.h"
diff --git a/src/map/chat.c b/src/map/chat.c
index 976b1ce8e..aaf34a6f9 100644
--- a/src/map/chat.c
+++ b/src/map/chat.c
@@ -14,7 +14,7 @@
#include "map/pc.h"
#include "map/skill.h" // ext_skill_unit_onplace()
#include "common/cbasetypes.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
diff --git a/src/map/chrif.c b/src/map/chrif.c
index a27038ff7..62ef52dbd 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -26,7 +26,7 @@
#include "common/HPM.h"
#include "common/cbasetypes.h"
#include "common/ers.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
#include "common/socket.h"
diff --git a/src/map/clif.c b/src/map/clif.c
index 9c7d327e6..bbd2f8c7f 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -42,7 +42,7 @@
#include "common/conf.h"
#include "common/ers.h"
#include "common/grfio.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h" // NEW_CARTS
#include "common/nullpo.h"
#include "common/random.h"
diff --git a/src/map/elemental.c b/src/map/elemental.c
index b629275e5..1ab93f6c5 100644
--- a/src/map/elemental.c
+++ b/src/map/elemental.c
@@ -26,7 +26,7 @@
#include "map/trade.h"
#include "map/unit.h"
#include "common/cbasetypes.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/nullpo.h"
#include "common/random.h"
diff --git a/src/map/guild.c b/src/map/guild.c
index f8798f821..6360e3e1f 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -23,7 +23,7 @@
#include "common/HPM.h"
#include "common/cbasetypes.h"
#include "common/ers.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mapindex.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
diff --git a/src/map/homunculus.c b/src/map/homunculus.c
index d0a4f6679..874d26fdb 100644
--- a/src/map/homunculus.c
+++ b/src/map/homunculus.c
@@ -27,7 +27,7 @@
#include "map/trade.h"
#include "map/unit.h"
#include "common/cbasetypes.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/nullpo.h"
#include "common/random.h"
diff --git a/src/map/instance.c b/src/map/instance.c
index 0936a5ace..545ffe1e7 100644
--- a/src/map/instance.c
+++ b/src/map/instance.c
@@ -17,7 +17,7 @@
#include "common/HPM.h"
#include "common/cbasetypes.h"
#include "common/db.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
#include "common/socket.h"
diff --git a/src/map/intif.c b/src/map/intif.c
index 1795055c4..1664a8a09 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -22,7 +22,7 @@
#include "map/pet.h"
#include "map/quest.h"
#include "map/storage.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
#include "common/socket.h"
diff --git a/src/map/irc-bot.c b/src/map/irc-bot.c
index f89bd2f1c..164242ff8 100644
--- a/src/map/irc-bot.c
+++ b/src/map/irc-bot.c
@@ -10,7 +10,7 @@
#include "map/map.h"
#include "map/pc.h"
#include "common/cbasetypes.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/random.h"
#include "common/showmsg.h"
#include "common/socket.h"
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index ccfff2246..3afb10bec 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -14,7 +14,7 @@
#include "map/script.h" // item script processing
#include "common/HPM.h"
#include "common/conf.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/nullpo.h"
#include "common/random.h"
#include "common/showmsg.h"
diff --git a/src/map/map.c b/src/map/map.c
index c64ab86b9..9a7cbe163 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -48,7 +48,7 @@
#include "common/core.h"
#include "common/ers.h"
#include "common/grfio.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/nullpo.h"
#include "common/random.h"
#include "common/showmsg.h"
diff --git a/src/map/mapreg_sql.c b/src/map/mapreg_sql.c
index 37c830e2e..93ac52f33 100644
--- a/src/map/mapreg_sql.c
+++ b/src/map/mapreg_sql.c
@@ -11,7 +11,7 @@
#include "common/cbasetypes.h"
#include "common/db.h"
#include "common/ers.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/showmsg.h"
#include "common/sql.h"
#include "common/strlib.h"
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index b26876d39..59a6f7a44 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -26,7 +26,7 @@
#include "map/trade.h"
#include "map/unit.h"
#include "common/cbasetypes.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/nullpo.h"
#include "common/random.h"
diff --git a/src/map/mob.c b/src/map/mob.c
index 01f585b6f..a14fa02df 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -32,7 +32,7 @@
#include "common/cbasetypes.h"
#include "common/db.h"
#include "common/ers.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/nullpo.h"
#include "common/random.h"
#include "common/showmsg.h"
diff --git a/src/map/npc.c b/src/map/npc.c
index 24b22beb3..7044fefcf 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -27,7 +27,7 @@
#include "common/cbasetypes.h"
#include "common/db.h"
#include "common/ers.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
#include "common/socket.h"
diff --git a/src/map/npc_chat.c b/src/map/npc_chat.c
index 503dbd845..edcd755bc 100644
--- a/src/map/npc_chat.c
+++ b/src/map/npc_chat.c
@@ -11,7 +11,7 @@
#include "map/mob.h" // struct mob_data
#include "map/pc.h" // struct map_session_data
#include "map/script.h" // set_var()
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
#include "common/strlib.h"
diff --git a/src/map/party.c b/src/map/party.c
index f7e7d431c..3a0b6d518 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -21,7 +21,7 @@
#include "map/status.h"
#include "common/HPM.h"
#include "common/cbasetypes.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/nullpo.h"
#include "common/random.h"
#include "common/showmsg.h"
diff --git a/src/map/path.c b/src/map/path.c
index 29701d445..6d9b48837 100644
--- a/src/map/path.c
+++ b/src/map/path.c
@@ -10,7 +10,7 @@
#include "map/map.h"
#include "common/cbasetypes.h"
#include "common/db.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/nullpo.h"
#include "common/random.h"
#include "common/showmsg.h"
diff --git a/src/map/pc.c b/src/map/pc.c
index fe339c457..4d4f41521 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -41,7 +41,7 @@
#include "common/conf.h"
#include "common/core.h" // get_svn_revision()
#include "common/HPM.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h" // NAME_LENGTH, MAX_CARTS, NEW_CARTS
#include "common/nullpo.h"
#include "common/random.h"
diff --git a/src/map/pc_groups.c b/src/map/pc_groups.c
index 7efcd7e26..f9633571c 100644
--- a/src/map/pc_groups.c
+++ b/src/map/pc_groups.c
@@ -13,7 +13,7 @@
#include "common/cbasetypes.h"
#include "common/conf.h"
#include "common/db.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
#include "common/strlib.h" // strcmp
diff --git a/src/map/pet.c b/src/map/pet.c
index 2865cc901..aed49df63 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -25,7 +25,7 @@
#include "map/unit.h"
#include "common/db.h"
#include "common/ers.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/nullpo.h"
#include "common/random.h"
#include "common/showmsg.h"
diff --git a/src/map/quest.c b/src/map/quest.c
index 4958644ee..790e96253 100644
--- a/src/map/quest.c
+++ b/src/map/quest.c
@@ -21,7 +21,7 @@
#include "map/unit.h"
#include "common/cbasetypes.h"
#include "common/conf.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/nullpo.h"
#include "common/random.h"
#include "common/showmsg.h"
diff --git a/src/map/script.c b/src/map/script.c
index 5dbe62df3..006daf7b9 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -39,7 +39,7 @@
#include "map/storage.h"
#include "map/unit.h"
#include "common/cbasetypes.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/md5calc.h"
#include "common/mmo.h" // NEW_CARTS
#include "common/nullpo.h"
diff --git a/src/map/searchstore.c b/src/map/searchstore.c
index 46b102ad5..cdcf51b0e 100644
--- a/src/map/searchstore.c
+++ b/src/map/searchstore.c
@@ -10,7 +10,7 @@
#include "map/clif.h" // clif-"open_search_store_info, clif-"search_store_info_*
#include "map/pc.h" // struct map_session_data
#include "common/cbasetypes.h"
-#include "common/malloc.h" // aMalloc, aRealloc, aFree
+#include "common/memmgr.h" // aMalloc, aRealloc, aFree
#include "common/showmsg.h" // ShowError, ShowWarning
#include "common/strlib.h" // safestrncpy
diff --git a/src/map/skill.c b/src/map/skill.c
index a9ebf6998..cdf1c031f 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -31,7 +31,7 @@
#include "map/unit.h"
#include "common/cbasetypes.h"
#include "common/ers.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/nullpo.h"
#include "common/random.h"
#include "common/showmsg.h"
diff --git a/src/map/status.c b/src/map/status.c
index d37dfc057..7a7a4f415 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -28,7 +28,7 @@
#include "map/vending.h"
#include "common/cbasetypes.h"
#include "common/ers.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/nullpo.h"
#include "common/random.h"
#include "common/showmsg.h"
diff --git a/src/map/storage.c b/src/map/storage.c
index fb6e2ed45..29f44f5e7 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -18,7 +18,7 @@
#include "map/pc.h"
#include "common/cbasetypes.h"
#include "common/db.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/nullpo.h"
#include <stdio.h>
diff --git a/src/map/unit.c b/src/map/unit.c
index dcb5ec900..7c253c5c2 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -34,7 +34,7 @@
#include "map/vending.h"
#include "common/HPM.h"
#include "common/db.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/nullpo.h"
#include "common/random.h"
#include "common/showmsg.h"
diff --git a/src/plugins/HPMHooking.c b/src/plugins/HPMHooking.c
index e5483da5b..a975c034e 100644
--- a/src/plugins/HPMHooking.c
+++ b/src/plugins/HPMHooking.c
@@ -4,7 +4,7 @@
#include "common/hercules.h"
#include "common/db.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/socket.h"
@@ -89,7 +89,7 @@
#include "common/conf.h"
#include "common/console.h"
#include "common/db.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/nullpo.h"
#include "common/showmsg.h"
#include "common/socket.h"
diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c
index 79eda0e5e..50781f319 100644
--- a/src/plugins/db2sql.c
+++ b/src/plugins/db2sql.c
@@ -6,7 +6,7 @@
#include "common/hercules.h"
#include "common/cbasetypes.h"
#include "common/conf.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/strlib.h"
#include "common/timer.h"
diff --git a/src/plugins/sample.c b/src/plugins/sample.c
index 275edb129..fea25514b 100644
--- a/src/plugins/sample.c
+++ b/src/plugins/sample.c
@@ -3,7 +3,7 @@
// Sample Hercules Plugin
#include "common/hercules.h" /* Should always be the first Hercules file included! (if you don't make it first, you won't be able to use interfaces) */
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/socket.h"
#include "common/strlib.h"
diff --git a/src/tool/mapcache.c b/src/tool/mapcache.c
index 72457b73a..6356867e2 100644
--- a/src/tool/mapcache.c
+++ b/src/tool/mapcache.c
@@ -6,7 +6,7 @@
#include "common/cbasetypes.h"
#include "common/core.h"
#include "common/grfio.h"
-#include "common/malloc.h"
+#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/showmsg.h"
#include "common/strlib.h"
diff --git a/vcproj-10/char-server.vcxproj b/vcproj-10/char-server.vcxproj
index 34d983d95..f17eb6cd4 100644
--- a/vcproj-10/char-server.vcxproj
+++ b/vcproj-10/char-server.vcxproj
@@ -145,7 +145,7 @@
<ClInclude Include="..\src\common\ers.h" />
<ClInclude Include="..\src\common\HPM.h" />
<ClInclude Include="..\src\common\HPMi.h" />
- <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\memmgr.h" />
<ClInclude Include="..\src\common\mapindex.h" />
<ClInclude Include="..\src\common\mmo.h" />
<ClInclude Include="..\src\common\mutex.h" />
@@ -191,7 +191,7 @@
<ClCompile Include="..\src\common\db.c" />
<ClCompile Include="..\src\common\ers.c" />
<ClCompile Include="..\src\common\HPM.c" />
- <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\memmgr.c" />
<ClCompile Include="..\src\common\mapindex.c" />
<ClCompile Include="..\src\common\mutex.c" />
<ClCompile Include="..\src\common\nullpo.c" />
diff --git a/vcproj-10/char-server.vcxproj.filters b/vcproj-10/char-server.vcxproj.filters
index b3b9e49cd..2f232b2cc 100644
--- a/vcproj-10/char-server.vcxproj.filters
+++ b/vcproj-10/char-server.vcxproj.filters
@@ -19,7 +19,7 @@
<ClCompile Include="..\src\common\HPM.c">
<Filter>common</Filter>
</ClCompile>
- <ClCompile Include="..\src\common\malloc.c">
+ <ClCompile Include="..\src\common\memmgr.c">
<Filter>common</Filter>
</ClCompile>
<ClCompile Include="..\src\common\mapindex.c">
@@ -153,7 +153,7 @@
<ClInclude Include="..\src\common\HPMi.h">
<Filter>common</Filter>
</ClInclude>
- <ClInclude Include="..\src\common\malloc.h">
+ <ClInclude Include="..\src\common\memmgr.h">
<Filter>common</Filter>
</ClInclude>
<ClInclude Include="..\src\common\mapindex.h">
diff --git a/vcproj-10/login-server.vcxproj b/vcproj-10/login-server.vcxproj
index 941a2f859..b7b020b03 100644
--- a/vcproj-10/login-server.vcxproj
+++ b/vcproj-10/login-server.vcxproj
@@ -154,7 +154,7 @@
<ClInclude Include="..\src\common\ers.h" />
<ClInclude Include="..\src\common\HPM.h" />
<ClInclude Include="..\src\common\HPMi.h" />
- <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\memmgr.h" />
<ClInclude Include="..\src\common\md5calc.h" />
<ClInclude Include="..\src\common\mmo.h" />
<ClInclude Include="..\src\common\nullpo.h" />
@@ -187,7 +187,7 @@
<ClCompile Include="..\src\common\db.c" />
<ClCompile Include="..\src\common\ers.c" />
<ClCompile Include="..\src\common\HPM.c" />
- <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\memmgr.c" />
<ClCompile Include="..\src\common\md5calc.c" />
<ClCompile Include="..\src\common\nullpo.c" />
<ClCompile Include="..\src\common\random.c" />
diff --git a/vcproj-10/login-server.vcxproj.filters b/vcproj-10/login-server.vcxproj.filters
index 6d83824eb..27bad5e85 100644
--- a/vcproj-10/login-server.vcxproj.filters
+++ b/vcproj-10/login-server.vcxproj.filters
@@ -28,7 +28,7 @@
<ClCompile Include="..\src\common\HPM.c">
<Filter>common</Filter>
</ClCompile>
- <ClCompile Include="..\src\common\malloc.c">
+ <ClCompile Include="..\src\common\memmgr.c">
<Filter>common</Filter>
</ClCompile>
<ClCompile Include="..\src\common\md5calc.c">
@@ -126,7 +126,7 @@
<ClInclude Include="..\src\common\HPMi.h">
<Filter>common</Filter>
</ClInclude>
- <ClInclude Include="..\src\common\malloc.h">
+ <ClInclude Include="..\src\common\memmgr.h">
<Filter>common</Filter>
</ClInclude>
<ClInclude Include="..\src\common\md5calc.h">
diff --git a/vcproj-10/map-server.vcxproj b/vcproj-10/map-server.vcxproj
index 338865a52..cbd4706c4 100644
--- a/vcproj-10/map-server.vcxproj
+++ b/vcproj-10/map-server.vcxproj
@@ -144,7 +144,7 @@
<ClInclude Include="..\src\common\HPM.h" />
<ClInclude Include="..\src\common\HPMi.h" />
<ClInclude Include="..\src\common\grfio.h" />
- <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\memmgr.h" />
<ClInclude Include="..\src\common\mapindex.h" />
<ClInclude Include="..\src\common\md5calc.h" />
<ClInclude Include="..\src\common\mmo.h" />
@@ -222,7 +222,7 @@
<ClCompile Include="..\src\common\ers.c" />
<ClCompile Include="..\src\common\grfio.c" />
<ClCompile Include="..\src\common\HPM.c" />
- <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\memmgr.c" />
<ClCompile Include="..\src\common\mapindex.c" />
<ClCompile Include="..\src\common\md5calc.c" />
<ClCompile Include="..\src\common\mutex.c" />
diff --git a/vcproj-10/map-server.vcxproj.filters b/vcproj-10/map-server.vcxproj.filters
index bd43e0d00..997a2970d 100644
--- a/vcproj-10/map-server.vcxproj.filters
+++ b/vcproj-10/map-server.vcxproj.filters
@@ -136,7 +136,7 @@
<ClCompile Include="..\src\common\HPM.c">
<Filter>common</Filter>
</ClCompile>
- <ClCompile Include="..\src\common\malloc.c">
+ <ClCompile Include="..\src\common\memmgr.c">
<Filter>common</Filter>
</ClCompile>
<ClCompile Include="..\src\common\mapindex.c">
@@ -348,7 +348,7 @@
<ClInclude Include="..\src\common\HPMi.h">
<Filter>common</Filter>
</ClInclude>
- <ClInclude Include="..\src\common\malloc.h">
+ <ClInclude Include="..\src\common\memmgr.h">
<Filter>common</Filter>
</ClInclude>
<ClInclude Include="..\src\common\mapindex.h">
diff --git a/vcproj-10/mapcache.vcxproj b/vcproj-10/mapcache.vcxproj
index 3cdb7b96a..980f31d10 100644
--- a/vcproj-10/mapcache.vcxproj
+++ b/vcproj-10/mapcache.vcxproj
@@ -127,7 +127,7 @@
<ClCompile Include="..\src\common\console.c" />
<ClCompile Include="..\src\common\des.c" />
<ClCompile Include="..\src\common\grfio.c" />
- <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\memmgr.c" />
<ClCompile Include="..\src\common\showmsg.c" />
<ClCompile Include="..\src\common\strlib.c" />
<ClCompile Include="..\src\common\sysinfo.c" />
@@ -141,7 +141,7 @@
<ClInclude Include="..\src\common\console.h" />
<ClInclude Include="..\src\common\des.h" />
<ClInclude Include="..\src\common\grfio.h" />
- <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\memmgr.h" />
<ClInclude Include="..\src\common\mmo.h" />
<ClInclude Include="..\src\common\showmsg.h" />
<ClInclude Include="..\src\common\strlib.h" />
diff --git a/vcproj-10/mapcache.vcxproj.filters b/vcproj-10/mapcache.vcxproj.filters
index fd376830e..903d34522 100644
--- a/vcproj-10/mapcache.vcxproj.filters
+++ b/vcproj-10/mapcache.vcxproj.filters
@@ -13,7 +13,7 @@
<ClCompile Include="..\src\common\grfio.c">
<Filter>common</Filter>
</ClCompile>
- <ClCompile Include="..\src\common\malloc.c">
+ <ClCompile Include="..\src\common\memmgr.c">
<Filter>common</Filter>
</ClCompile>
<ClCompile Include="..\src\common\showmsg.c">
@@ -51,7 +51,7 @@
<ClInclude Include="..\src\common\grfio.h">
<Filter>common</Filter>
</ClInclude>
- <ClInclude Include="..\src\common\malloc.h">
+ <ClInclude Include="..\src\common\memmgr.h">
<Filter>common</Filter>
</ClInclude>
<ClInclude Include="..\src\common\mmo.h">
diff --git a/vcproj-11/char-server.vcxproj b/vcproj-11/char-server.vcxproj
index 073b37e5a..49666e898 100644
--- a/vcproj-11/char-server.vcxproj
+++ b/vcproj-11/char-server.vcxproj
@@ -148,7 +148,7 @@
<ClInclude Include="..\src\common\ers.h" />
<ClInclude Include="..\src\common\HPM.h" />
<ClInclude Include="..\src\common\HPMi.h" />
- <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\memmgr.h" />
<ClInclude Include="..\src\common\mapindex.h" />
<ClInclude Include="..\src\common\mmo.h" />
<ClInclude Include="..\src\common\mutex.h" />
@@ -194,7 +194,7 @@
<ClCompile Include="..\src\common\db.c" />
<ClCompile Include="..\src\common\ers.c" />
<ClCompile Include="..\src\common\HPM.c" />
- <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\memmgr.c" />
<ClCompile Include="..\src\common\mapindex.c" />
<ClCompile Include="..\src\common\mutex.c" />
<ClCompile Include="..\src\common\nullpo.c" />
diff --git a/vcproj-11/char-server.vcxproj.filters b/vcproj-11/char-server.vcxproj.filters
index b3b9e49cd..2f232b2cc 100644
--- a/vcproj-11/char-server.vcxproj.filters
+++ b/vcproj-11/char-server.vcxproj.filters
@@ -19,7 +19,7 @@
<ClCompile Include="..\src\common\HPM.c">
<Filter>common</Filter>
</ClCompile>
- <ClCompile Include="..\src\common\malloc.c">
+ <ClCompile Include="..\src\common\memmgr.c">
<Filter>common</Filter>
</ClCompile>
<ClCompile Include="..\src\common\mapindex.c">
@@ -153,7 +153,7 @@
<ClInclude Include="..\src\common\HPMi.h">
<Filter>common</Filter>
</ClInclude>
- <ClInclude Include="..\src\common\malloc.h">
+ <ClInclude Include="..\src\common\memmgr.h">
<Filter>common</Filter>
</ClInclude>
<ClInclude Include="..\src\common\mapindex.h">
diff --git a/vcproj-11/login-server.vcxproj b/vcproj-11/login-server.vcxproj
index aafa462e1..44b5d6381 100644
--- a/vcproj-11/login-server.vcxproj
+++ b/vcproj-11/login-server.vcxproj
@@ -158,7 +158,7 @@
<ClInclude Include="..\src\common\ers.h" />
<ClInclude Include="..\src\common\HPM.h" />
<ClInclude Include="..\src\common\HPMi.h" />
- <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\memmgr.h" />
<ClInclude Include="..\src\common\md5calc.h" />
<ClInclude Include="..\src\common\mmo.h" />
<ClInclude Include="..\src\common\nullpo.h" />
@@ -191,7 +191,7 @@
<ClCompile Include="..\src\common\db.c" />
<ClCompile Include="..\src\common\ers.c" />
<ClCompile Include="..\src\common\HPM.c" />
- <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\memmgr.c" />
<ClCompile Include="..\src\common\md5calc.c" />
<ClCompile Include="..\src\common\nullpo.c" />
<ClCompile Include="..\src\common\random.c" />
diff --git a/vcproj-11/login-server.vcxproj.filters b/vcproj-11/login-server.vcxproj.filters
index 50a6645f8..c429a223d 100644
--- a/vcproj-11/login-server.vcxproj.filters
+++ b/vcproj-11/login-server.vcxproj.filters
@@ -34,7 +34,7 @@
<ClCompile Include="..\src\common\HPM.c">
<Filter>common</Filter>
</ClCompile>
- <ClCompile Include="..\src\common\malloc.c">
+ <ClCompile Include="..\src\common\memmgr.c">
<Filter>common</Filter>
</ClCompile>
<ClCompile Include="..\src\common\md5calc.c">
@@ -132,7 +132,7 @@
<ClInclude Include="..\src\common\HPMi.h">
<Filter>common</Filter>
</ClInclude>
- <ClInclude Include="..\src\common\malloc.h">
+ <ClInclude Include="..\src\common\memmgr.h">
<Filter>common</Filter>
</ClInclude>
<ClInclude Include="..\src\common\md5calc.h">
diff --git a/vcproj-11/map-server.vcxproj b/vcproj-11/map-server.vcxproj
index f837c682c..e4a932d65 100644
--- a/vcproj-11/map-server.vcxproj
+++ b/vcproj-11/map-server.vcxproj
@@ -148,7 +148,7 @@
<ClInclude Include="..\src\common\grfio.h" />
<ClInclude Include="..\src\common\HPM.h" />
<ClInclude Include="..\src\common\HPMi.h" />
- <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\memmgr.h" />
<ClInclude Include="..\src\common\mapindex.h" />
<ClInclude Include="..\src\common\md5calc.h" />
<ClInclude Include="..\src\common\mmo.h" />
@@ -226,7 +226,7 @@
<ClCompile Include="..\src\common\ers.c" />
<ClCompile Include="..\src\common\grfio.c" />
<ClCompile Include="..\src\common\HPM.c" />
- <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\memmgr.c" />
<ClCompile Include="..\src\common\mapindex.c" />
<ClCompile Include="..\src\common\md5calc.c" />
<ClCompile Include="..\src\common\mutex.c" />
diff --git a/vcproj-11/map-server.vcxproj.filters b/vcproj-11/map-server.vcxproj.filters
index bd43e0d00..997a2970d 100644
--- a/vcproj-11/map-server.vcxproj.filters
+++ b/vcproj-11/map-server.vcxproj.filters
@@ -136,7 +136,7 @@
<ClCompile Include="..\src\common\HPM.c">
<Filter>common</Filter>
</ClCompile>
- <ClCompile Include="..\src\common\malloc.c">
+ <ClCompile Include="..\src\common\memmgr.c">
<Filter>common</Filter>
</ClCompile>
<ClCompile Include="..\src\common\mapindex.c">
@@ -348,7 +348,7 @@
<ClInclude Include="..\src\common\HPMi.h">
<Filter>common</Filter>
</ClInclude>
- <ClInclude Include="..\src\common\malloc.h">
+ <ClInclude Include="..\src\common\memmgr.h">
<Filter>common</Filter>
</ClInclude>
<ClInclude Include="..\src\common\mapindex.h">
diff --git a/vcproj-11/mapcache.vcxproj b/vcproj-11/mapcache.vcxproj
index 3ad70626f..2779ae778 100644
--- a/vcproj-11/mapcache.vcxproj
+++ b/vcproj-11/mapcache.vcxproj
@@ -131,7 +131,7 @@
<ClCompile Include="..\src\common\console.c" />
<ClCompile Include="..\src\common\des.c" />
<ClCompile Include="..\src\common\grfio.c" />
- <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\memmgr.c" />
<ClCompile Include="..\src\common\showmsg.c" />
<ClCompile Include="..\src\common\strlib.c" />
<ClCompile Include="..\src\common\sysinfo.c" />
@@ -145,7 +145,7 @@
<ClInclude Include="..\src\common\console.h" />
<ClInclude Include="..\src\common\des.h" />
<ClInclude Include="..\src\common\grfio.h" />
- <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\memmgr.h" />
<ClInclude Include="..\src\common\mmo.h" />
<ClInclude Include="..\src\common\showmsg.h" />
<ClInclude Include="..\src\common\strlib.h" />
diff --git a/vcproj-11/mapcache.vcxproj.filters b/vcproj-11/mapcache.vcxproj.filters
index d5c2fbb83..957cabac8 100644
--- a/vcproj-11/mapcache.vcxproj.filters
+++ b/vcproj-11/mapcache.vcxproj.filters
@@ -13,7 +13,7 @@
<ClCompile Include="..\src\common\grfio.c">
<Filter>common</Filter>
</ClCompile>
- <ClCompile Include="..\src\common\malloc.c">
+ <ClCompile Include="..\src\common\memmgr.c">
<Filter>common</Filter>
</ClCompile>
<ClCompile Include="..\src\common\showmsg.c">
@@ -51,7 +51,7 @@
<ClInclude Include="..\src\common\grfio.h">
<Filter>common</Filter>
</ClInclude>
- <ClInclude Include="..\src\common\malloc.h">
+ <ClInclude Include="..\src\common\memmgr.h">
<Filter>common</Filter>
</ClInclude>
<ClInclude Include="..\src\common\mmo.h">
diff --git a/vcproj-12/char-server.vcxproj b/vcproj-12/char-server.vcxproj
index 5a86a402f..ad2f60c34 100644
--- a/vcproj-12/char-server.vcxproj
+++ b/vcproj-12/char-server.vcxproj
@@ -147,7 +147,7 @@
<ClInclude Include="..\src\common\ers.h" />
<ClInclude Include="..\src\common\HPM.h" />
<ClInclude Include="..\src\common\HPMi.h" />
- <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\memmgr.h" />
<ClInclude Include="..\src\common\mapindex.h" />
<ClInclude Include="..\src\common\mmo.h" />
<ClInclude Include="..\src\common\mutex.h" />
@@ -193,7 +193,7 @@
<ClCompile Include="..\src\common\db.c" />
<ClCompile Include="..\src\common\ers.c" />
<ClCompile Include="..\src\common\HPM.c" />
- <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\memmgr.c" />
<ClCompile Include="..\src\common\mapindex.c" />
<ClCompile Include="..\src\common\mutex.c" />
<ClCompile Include="..\src\common\nullpo.c" />
diff --git a/vcproj-12/char-server.vcxproj.filters b/vcproj-12/char-server.vcxproj.filters
index b3b9e49cd..2f232b2cc 100644
--- a/vcproj-12/char-server.vcxproj.filters
+++ b/vcproj-12/char-server.vcxproj.filters
@@ -19,7 +19,7 @@
<ClCompile Include="..\src\common\HPM.c">
<Filter>common</Filter>
</ClCompile>
- <ClCompile Include="..\src\common\malloc.c">
+ <ClCompile Include="..\src\common\memmgr.c">
<Filter>common</Filter>
</ClCompile>
<ClCompile Include="..\src\common\mapindex.c">
@@ -153,7 +153,7 @@
<ClInclude Include="..\src\common\HPMi.h">
<Filter>common</Filter>
</ClInclude>
- <ClInclude Include="..\src\common\malloc.h">
+ <ClInclude Include="..\src\common\memmgr.h">
<Filter>common</Filter>
</ClInclude>
<ClInclude Include="..\src\common\mapindex.h">
diff --git a/vcproj-12/login-server.vcxproj b/vcproj-12/login-server.vcxproj
index 1ea0b5ec9..dfc35bf20 100644
--- a/vcproj-12/login-server.vcxproj
+++ b/vcproj-12/login-server.vcxproj
@@ -158,7 +158,7 @@
<ClInclude Include="..\src\common\ers.h" />
<ClInclude Include="..\src\common\HPM.h" />
<ClInclude Include="..\src\common\HPMi.h" />
- <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\memmgr.h" />
<ClInclude Include="..\src\common\md5calc.h" />
<ClInclude Include="..\src\common\mmo.h" />
<ClInclude Include="..\src\common\nullpo.h" />
@@ -191,7 +191,7 @@
<ClCompile Include="..\src\common\db.c" />
<ClCompile Include="..\src\common\ers.c" />
<ClCompile Include="..\src\common\HPM.c" />
- <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\memmgr.c" />
<ClCompile Include="..\src\common\md5calc.c" />
<ClCompile Include="..\src\common\nullpo.c" />
<ClCompile Include="..\src\common\random.c" />
diff --git a/vcproj-12/login-server.vcxproj.filters b/vcproj-12/login-server.vcxproj.filters
index 50a6645f8..c429a223d 100644
--- a/vcproj-12/login-server.vcxproj.filters
+++ b/vcproj-12/login-server.vcxproj.filters
@@ -34,7 +34,7 @@
<ClCompile Include="..\src\common\HPM.c">
<Filter>common</Filter>
</ClCompile>
- <ClCompile Include="..\src\common\malloc.c">
+ <ClCompile Include="..\src\common\memmgr.c">
<Filter>common</Filter>
</ClCompile>
<ClCompile Include="..\src\common\md5calc.c">
@@ -132,7 +132,7 @@
<ClInclude Include="..\src\common\HPMi.h">
<Filter>common</Filter>
</ClInclude>
- <ClInclude Include="..\src\common\malloc.h">
+ <ClInclude Include="..\src\common\memmgr.h">
<Filter>common</Filter>
</ClInclude>
<ClInclude Include="..\src\common\md5calc.h">
diff --git a/vcproj-12/map-server.vcxproj b/vcproj-12/map-server.vcxproj
index b08c43cf7..3d8d53f9d 100644
--- a/vcproj-12/map-server.vcxproj
+++ b/vcproj-12/map-server.vcxproj
@@ -148,7 +148,7 @@
<ClInclude Include="..\src\common\grfio.h" />
<ClInclude Include="..\src\common\HPM.h" />
<ClInclude Include="..\src\common\HPMi.h" />
- <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\memmgr.h" />
<ClInclude Include="..\src\common\mapindex.h" />
<ClInclude Include="..\src\common\md5calc.h" />
<ClInclude Include="..\src\common\mmo.h" />
@@ -226,7 +226,7 @@
<ClCompile Include="..\src\common\ers.c" />
<ClCompile Include="..\src\common\grfio.c" />
<ClCompile Include="..\src\common\HPM.c" />
- <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\memmgr.c" />
<ClCompile Include="..\src\common\mapindex.c" />
<ClCompile Include="..\src\common\md5calc.c" />
<ClCompile Include="..\src\common\mutex.c" />
diff --git a/vcproj-12/map-server.vcxproj.filters b/vcproj-12/map-server.vcxproj.filters
index bd43e0d00..997a2970d 100644
--- a/vcproj-12/map-server.vcxproj.filters
+++ b/vcproj-12/map-server.vcxproj.filters
@@ -136,7 +136,7 @@
<ClCompile Include="..\src\common\HPM.c">
<Filter>common</Filter>
</ClCompile>
- <ClCompile Include="..\src\common\malloc.c">
+ <ClCompile Include="..\src\common\memmgr.c">
<Filter>common</Filter>
</ClCompile>
<ClCompile Include="..\src\common\mapindex.c">
@@ -348,7 +348,7 @@
<ClInclude Include="..\src\common\HPMi.h">
<Filter>common</Filter>
</ClInclude>
- <ClInclude Include="..\src\common\malloc.h">
+ <ClInclude Include="..\src\common\memmgr.h">
<Filter>common</Filter>
</ClInclude>
<ClInclude Include="..\src\common\mapindex.h">
diff --git a/vcproj-12/mapcache.vcxproj b/vcproj-12/mapcache.vcxproj
index 37f4a161d..54713b098 100644
--- a/vcproj-12/mapcache.vcxproj
+++ b/vcproj-12/mapcache.vcxproj
@@ -131,7 +131,7 @@
<ClCompile Include="..\src\common\console.c" />
<ClCompile Include="..\src\common\des.c" />
<ClCompile Include="..\src\common\grfio.c" />
- <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\memmgr.c" />
<ClCompile Include="..\src\common\showmsg.c" />
<ClCompile Include="..\src\common\strlib.c" />
<ClCompile Include="..\src\common\sysinfo.c" />
@@ -145,7 +145,7 @@
<ClInclude Include="..\src\common\console.h" />
<ClInclude Include="..\src\common\des.h" />
<ClInclude Include="..\src\common\grfio.h" />
- <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\memmgr.h" />
<ClInclude Include="..\src\common\mmo.h" />
<ClInclude Include="..\src\common\showmsg.h" />
<ClInclude Include="..\src\common\strlib.h" />
diff --git a/vcproj-12/mapcache.vcxproj.filters b/vcproj-12/mapcache.vcxproj.filters
index d5c2fbb83..957cabac8 100644
--- a/vcproj-12/mapcache.vcxproj.filters
+++ b/vcproj-12/mapcache.vcxproj.filters
@@ -13,7 +13,7 @@
<ClCompile Include="..\src\common\grfio.c">
<Filter>common</Filter>
</ClCompile>
- <ClCompile Include="..\src\common\malloc.c">
+ <ClCompile Include="..\src\common\memmgr.c">
<Filter>common</Filter>
</ClCompile>
<ClCompile Include="..\src\common\showmsg.c">
@@ -51,7 +51,7 @@
<ClInclude Include="..\src\common\grfio.h">
<Filter>common</Filter>
</ClInclude>
- <ClInclude Include="..\src\common\malloc.h">
+ <ClInclude Include="..\src\common\memmgr.h">
<Filter>common</Filter>
</ClInclude>
<ClInclude Include="..\src\common\mmo.h">
diff --git a/vcproj-14/char-server.vcxproj b/vcproj-14/char-server.vcxproj
index 565b99ce6..dd3f53526 100644
--- a/vcproj-14/char-server.vcxproj
+++ b/vcproj-14/char-server.vcxproj
@@ -146,7 +146,7 @@
<ClInclude Include="..\src\common\ers.h" />
<ClInclude Include="..\src\common\HPM.h" />
<ClInclude Include="..\src\common\HPMi.h" />
- <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\memmgr.h" />
<ClInclude Include="..\src\common\mapindex.h" />
<ClInclude Include="..\src\common\mmo.h" />
<ClInclude Include="..\src\common\mutex.h" />
@@ -192,7 +192,7 @@
<ClCompile Include="..\src\common\db.c" />
<ClCompile Include="..\src\common\ers.c" />
<ClCompile Include="..\src\common\HPM.c" />
- <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\memmgr.c" />
<ClCompile Include="..\src\common\mapindex.c" />
<ClCompile Include="..\src\common\mutex.c" />
<ClCompile Include="..\src\common\nullpo.c" />
diff --git a/vcproj-14/char-server.vcxproj.filters b/vcproj-14/char-server.vcxproj.filters
index b3b9e49cd..2f232b2cc 100644
--- a/vcproj-14/char-server.vcxproj.filters
+++ b/vcproj-14/char-server.vcxproj.filters
@@ -19,7 +19,7 @@
<ClCompile Include="..\src\common\HPM.c">
<Filter>common</Filter>
</ClCompile>
- <ClCompile Include="..\src\common\malloc.c">
+ <ClCompile Include="..\src\common\memmgr.c">
<Filter>common</Filter>
</ClCompile>
<ClCompile Include="..\src\common\mapindex.c">
@@ -153,7 +153,7 @@
<ClInclude Include="..\src\common\HPMi.h">
<Filter>common</Filter>
</ClInclude>
- <ClInclude Include="..\src\common\malloc.h">
+ <ClInclude Include="..\src\common\memmgr.h">
<Filter>common</Filter>
</ClInclude>
<ClInclude Include="..\src\common\mapindex.h">
diff --git a/vcproj-14/login-server.vcxproj b/vcproj-14/login-server.vcxproj
index ca8d0cf23..5589cc35d 100644
--- a/vcproj-14/login-server.vcxproj
+++ b/vcproj-14/login-server.vcxproj
@@ -156,7 +156,7 @@
<ClInclude Include="..\src\common\ers.h" />
<ClInclude Include="..\src\common\HPM.h" />
<ClInclude Include="..\src\common\HPMi.h" />
- <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\memmgr.h" />
<ClInclude Include="..\src\common\md5calc.h" />
<ClInclude Include="..\src\common\mmo.h" />
<ClInclude Include="..\src\common\nullpo.h" />
@@ -189,7 +189,7 @@
<ClCompile Include="..\src\common\db.c" />
<ClCompile Include="..\src\common\ers.c" />
<ClCompile Include="..\src\common\HPM.c" />
- <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\memmgr.c" />
<ClCompile Include="..\src\common\md5calc.c" />
<ClCompile Include="..\src\common\nullpo.c" />
<ClCompile Include="..\src\common\random.c" />
diff --git a/vcproj-14/login-server.vcxproj.filters b/vcproj-14/login-server.vcxproj.filters
index fff84ea41..0d27feaea 100644
--- a/vcproj-14/login-server.vcxproj.filters
+++ b/vcproj-14/login-server.vcxproj.filters
@@ -34,7 +34,7 @@
<ClCompile Include="..\src\common\HPM.c">
<Filter>common</Filter>
</ClCompile>
- <ClCompile Include="..\src\common\malloc.c">
+ <ClCompile Include="..\src\common\memmgr.c">
<Filter>common</Filter>
</ClCompile>
<ClCompile Include="..\src\common\md5calc.c">
@@ -132,7 +132,7 @@
<ClInclude Include="..\src\common\HPMi.h">
<Filter>common</Filter>
</ClInclude>
- <ClInclude Include="..\src\common\malloc.h">
+ <ClInclude Include="..\src\common\memmgr.h">
<Filter>common</Filter>
</ClInclude>
<ClInclude Include="..\src\common\md5calc.h">
diff --git a/vcproj-14/map-server.vcxproj b/vcproj-14/map-server.vcxproj
index 264bd2365..425c864f6 100644
--- a/vcproj-14/map-server.vcxproj
+++ b/vcproj-14/map-server.vcxproj
@@ -146,7 +146,7 @@
<ClInclude Include="..\src\common\grfio.h" />
<ClInclude Include="..\src\common\HPM.h" />
<ClInclude Include="..\src\common\HPMi.h" />
- <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\memmgr.h" />
<ClInclude Include="..\src\common\mapindex.h" />
<ClInclude Include="..\src\common\md5calc.h" />
<ClInclude Include="..\src\common\mmo.h" />
@@ -224,7 +224,7 @@
<ClCompile Include="..\src\common\ers.c" />
<ClCompile Include="..\src\common\grfio.c" />
<ClCompile Include="..\src\common\HPM.c" />
- <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\memmgr.c" />
<ClCompile Include="..\src\common\mapindex.c" />
<ClCompile Include="..\src\common\md5calc.c" />
<ClCompile Include="..\src\common\mutex.c" />
diff --git a/vcproj-14/map-server.vcxproj.filters b/vcproj-14/map-server.vcxproj.filters
index 8347c134a..40ace58c8 100644
--- a/vcproj-14/map-server.vcxproj.filters
+++ b/vcproj-14/map-server.vcxproj.filters
@@ -136,7 +136,7 @@
<ClCompile Include="..\src\common\HPM.c">
<Filter>common</Filter>
</ClCompile>
- <ClCompile Include="..\src\common\malloc.c">
+ <ClCompile Include="..\src\common\memmgr.c">
<Filter>common</Filter>
</ClCompile>
<ClCompile Include="..\src\common\mapindex.c">
@@ -349,7 +349,7 @@
<ClInclude Include="..\src\common\HPMi.h">
<Filter>common</Filter>
</ClInclude>
- <ClInclude Include="..\src\common\malloc.h">
+ <ClInclude Include="..\src\common\memmgr.h">
<Filter>common</Filter>
</ClInclude>
<ClInclude Include="..\src\common\mapindex.h">
diff --git a/vcproj-14/mapcache.vcxproj b/vcproj-14/mapcache.vcxproj
index 1d08545e9..7304b8df4 100644
--- a/vcproj-14/mapcache.vcxproj
+++ b/vcproj-14/mapcache.vcxproj
@@ -129,7 +129,7 @@
<ClCompile Include="..\src\common\console.c" />
<ClCompile Include="..\src\common\des.c" />
<ClCompile Include="..\src\common\grfio.c" />
- <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\memmgr.c" />
<ClCompile Include="..\src\common\showmsg.c" />
<ClCompile Include="..\src\common\strlib.c" />
<ClCompile Include="..\src\common\sysinfo.c" />
@@ -143,7 +143,7 @@
<ClInclude Include="..\src\common\console.h" />
<ClInclude Include="..\src\common\des.h" />
<ClInclude Include="..\src\common\grfio.h" />
- <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\memmgr.h" />
<ClInclude Include="..\src\common\mmo.h" />
<ClInclude Include="..\src\common\showmsg.h" />
<ClInclude Include="..\src\common\strlib.h" />
diff --git a/vcproj-14/mapcache.vcxproj.filters b/vcproj-14/mapcache.vcxproj.filters
index d5c2fbb83..957cabac8 100644
--- a/vcproj-14/mapcache.vcxproj.filters
+++ b/vcproj-14/mapcache.vcxproj.filters
@@ -13,7 +13,7 @@
<ClCompile Include="..\src\common\grfio.c">
<Filter>common</Filter>
</ClCompile>
- <ClCompile Include="..\src\common\malloc.c">
+ <ClCompile Include="..\src\common\memmgr.c">
<Filter>common</Filter>
</ClCompile>
<ClCompile Include="..\src\common\showmsg.c">
@@ -51,7 +51,7 @@
<ClInclude Include="..\src\common\grfio.h">
<Filter>common</Filter>
</ClInclude>
- <ClInclude Include="..\src\common\malloc.h">
+ <ClInclude Include="..\src\common\memmgr.h">
<Filter>common</Filter>
</ClInclude>
<ClInclude Include="..\src\common\mmo.h">