diff options
author | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-27 06:38:17 +0000 |
---|---|---|
committer | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-27 06:38:17 +0000 |
commit | 3c8999edce9e1f0d5c0dee3ff8311e781d64c684 (patch) | |
tree | d066567a720e5fad02e6f857d55bc165d9a3809a /src/common/timer.c | |
parent | ea320701794515d4ffa6a8e8ff8f3b8fdfe09860 (diff) | |
download | hercules-3c8999edce9e1f0d5c0dee3ff8311e781d64c684.tar.gz hercules-3c8999edce9e1f0d5c0dee3ff8311e781d64c684.tar.bz2 hercules-3c8999edce9e1f0d5c0dee3ff8311e781d64c684.tar.xz hercules-3c8999edce9e1f0d5c0dee3ff8311e781d64c684.zip |
* Optional macro MEMSET_TURBO for faster low-level memory initializations.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8499 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/timer.c')
-rw-r--r-- | src/common/timer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/timer.c b/src/common/timer.c index 9baa33e08..1e9ff25aa 100644 --- a/src/common/timer.c +++ b/src/common/timer.c @@ -20,7 +20,7 @@ #include <time.h>
#include "timer.h"
-#include "malloc.h"
+#include "../common/malloc.h"
#include "showmsg.h"
// タイマー間隔の最小値。モンスターの大量召還時、多数のクライアント接続時に
@@ -137,7 +137,7 @@ static void push_timer_heap(int index) } else {
timer_heap_max += 256;
timer_heap = (int *) aRealloc( timer_heap, sizeof(int) * timer_heap_max);
- memset(timer_heap + (timer_heap_max - 256), 0, sizeof(int) * 256);
+ malloc_tsetdword(timer_heap + (timer_heap_max - 256), 0, sizeof(int) * 256);
}
}
@@ -210,7 +210,7 @@ int acquire_timer (void) } else {
timer_data_max += 256;
timer_data = (struct TimerData *) aRealloc( timer_data, sizeof(struct TimerData) * timer_data_max);
- memset(timer_data + (timer_data_max - 256), 0, sizeof(struct TimerData) * 256);
+ malloc_tsetdword(timer_data + (timer_data_max - 256), 0, sizeof(struct TimerData) * 256);
}
}
@@ -383,7 +383,7 @@ int do_timer(unsigned int tick) if (free_timer_list_pos >= free_timer_list_max) {
free_timer_list_max += 256;
free_timer_list = (int *) aRealloc(free_timer_list, sizeof(int) * free_timer_list_max);
- memset(free_timer_list + (free_timer_list_max - 256), 0, 256 * sizeof(int));
+ malloc_tsetdword(free_timer_list + (free_timer_list_max - 256), 0, 256 * sizeof(int));
}
free_timer_list[free_timer_list_pos++] = i;
break;
|