- 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://svn.code.sf.net/p/rathena/svn/trunk@8189 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
8157062811
commit
d12f317dbb
@ -4,6 +4,10 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
|
|||||||
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
||||||
|
|
||||||
2006/08/08
|
2006/08/08
|
||||||
|
* 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 and is reported. [Skotlex]
|
||||||
* Casting Kaensin will clear out Suiton and viceversa now. [Skotlex]
|
* Casting Kaensin will clear out Suiton and viceversa now. [Skotlex]
|
||||||
* Fixed drop-rates (@whodrops) getting duplicates when you use @reloadmobdb
|
* Fixed drop-rates (@whodrops) getting duplicates when you use @reloadmobdb
|
||||||
[Skotlex]
|
[Skotlex]
|
||||||
|
@ -290,13 +290,15 @@ int map_freeblock_lock (void)
|
|||||||
* バッファにたまっていたblockを全部削除
|
* バッファにたまっていた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) {
|
if ((--block_free_lock) == 0) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < block_free_count; 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]
|
{ //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[i] = NULL;
|
||||||
}
|
}
|
||||||
block_free_count = 0;
|
block_free_count = 0;
|
||||||
|
@ -1278,7 +1278,9 @@ int map_getusers(void);
|
|||||||
// block<63>í<EFBFBD>œŠÖ˜A
|
// block<63>í<EFBFBD>œŠÖ˜A
|
||||||
int map_freeblock(struct block_list *bl);
|
int map_freeblock(struct block_list *bl);
|
||||||
int map_freeblock_lock(void);
|
int map_freeblock_lock(void);
|
||||||
int map_freeblock_unlock(void);
|
//int map_freeblock_unlock(void);
|
||||||
|
int map_freeblock_unlock_sub (char *file, int lineno);
|
||||||
|
#define map_freeblock_unlock() map_freeblock_unlock_sub (__FILE__, __LINE__)
|
||||||
// blockŠÖ˜A
|
// blockŠÖ˜A
|
||||||
int map_addblock_sub(struct block_list *, int);
|
int map_addblock_sub(struct block_list *, int);
|
||||||
int map_delblock_sub(struct block_list *, int);
|
int map_delblock_sub(struct block_list *, int);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user