From 13bd7f95bf5efb4e4acf274baf20636682ea4b58 Mon Sep 17 00:00:00 2001 From: skotlex Date: Tue, 8 Aug 2006 18:55:46 +0000 Subject: - Changed the map_freeblock_unlock code so that when there's an "already free'd pointer" error, the memory manager will print out the invoking function rather than map_freeblock_unlock, this should help fix it up next time it happens. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8189 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/map.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/map/map.c') diff --git a/src/map/map.c b/src/map/map.c index 2428cc6e2..71af45530 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -290,13 +290,15 @@ int map_freeblock_lock (void) * バッファにたまっていたblockを全部削除 *------------------------------------------ */ -int map_freeblock_unlock (void) +//int map_freeblock_unlock (void) +int map_freeblock_unlock_sub(char *file, int lineno) { if ((--block_free_lock) == 0) { int i; for (i = 0; i < block_free_count; i++) { //Directly calling aFree shouldn't be a leak, as Free remembers the size the original pointed to memory was allocated with? [Skotlex] - aFree(block_free[i]); +// aFree(block_free[i]); + _mfree(block_free[i], file, lineno, __func__); block_free[i] = NULL; } block_free_count = 0; -- cgit v1.2.3-60-g2f50