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/map/map.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/map/map.c')
-rw-r--r-- | src/map/map.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/map.c b/src/map/map.c index a668ecad8..81e62b875 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -2542,7 +2542,7 @@ static int map_cache_open(char *fn) // 読み甲ンに失敗したので新規に作成する map_cache.fp = fopen(fn,"wb"); if(map_cache.fp) { - memset(&map_cache.head,0,sizeof(struct map_cache_head)); + malloc_set(&map_cache.head,0,sizeof(struct map_cache_head)); map_cache.map = (struct map_cache_info *) aCalloc(sizeof(struct map_cache_info),MAX_MAP_CACHE); map_cache.head.nmaps = MAX_MAP_CACHE; map_cache.head.sizeof_header = sizeof(struct map_cache_head); @@ -3107,7 +3107,7 @@ int map_readallmaps (void) // pre-init some data map[i].alias = NULL; map[i].m = i; - memset (map[i].moblist, 0, sizeof(map[i].moblist)); //Initialize moblist [Skotlex] + malloc_set (map[i].moblist, 0, sizeof(map[i].moblist)); //Initialize moblist [Skotlex] map[i].mob_delete_timer = -1; //Initialize timer [Skotlex] if (battle_config.pk_mode) map[i].flag.pvp = 1; // make all maps pvp for pk_mode [Valaris] @@ -3225,7 +3225,7 @@ int parse_console(char *buf) { int m, n; struct map_session_data sd; - memset(&sd, 0, sizeof(struct map_session_data)); + malloc_set(&sd, 0, sizeof(struct map_session_data)); strcpy( sd.status.name , "console"); if ( ( n = sscanf(buf, "%[^:]:%[^:]:%99s %d %d[^\n]", type , command , map , &x , &y )) < 5 ) |