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/socket.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/socket.c')
-rw-r--r-- | src/common/socket.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/socket.c b/src/common/socket.c index dc8162ee1..3d7684972 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -424,7 +424,7 @@ int make_listen_port(int port) CREATE(session[fd], struct socket_data, 1);
- memset(session[fd],0,sizeof(*session[fd]));
+ malloc_set(session[fd],0,sizeof(*session[fd]));
session[fd]->func_recv = connect_client;
return fd;
@@ -502,7 +502,7 @@ int make_listen_bind(long ip,int port) CREATE(session[fd], struct socket_data, 1);
- memset(session[fd],0,sizeof(*session[fd]));
+ malloc_set(session[fd],0,sizeof(*session[fd]));
session[fd]->func_recv = connect_client;
ShowStatus("Open listen port on %d.%d.%d.%d:%i\n",
@@ -517,7 +517,7 @@ int console_recieve(int i) { char *buf;
CREATE_A(buf, char, 64);
- memset(buf,0,sizeof(64));
+ malloc_tsetdword(buf,0,sizeof(64));
n = read(0, buf , 64);
if ( n < 0 )
@@ -580,7 +580,7 @@ int start_console(void) { if (!session[0]) { // dummy socket already uses fd 0
CREATE(session[0], struct socket_data, 1);
}
- memset(session[0],0,sizeof(*session[0]));
+ malloc_set(session[0],0,sizeof(*session[0]));
session[0]->func_recv = console_recieve;
session[0]->func_console = default_console_parse;
@@ -1369,7 +1369,7 @@ void socket_init (void) session[0]->max_rdata = (int)2*rfifo_size;
session[0]->max_wdata = (int)2*wfifo_size;
- memset (func_parse_table, 0, sizeof(func_parse_table));
+ malloc_set (func_parse_table, 0, sizeof(func_parse_table));
func_parse_table[SESSION_RAW].check = default_func_check;
func_parse_table[SESSION_RAW].func = default_func_parse;
|