From: Carsten W. <ca...@us...> - 2005-01-17 21:55:57
|
Update of /cvsroot/jake2/jake2/src/jake2/qcommon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22563/src/jake2/qcommon Modified Files: Netchan.java Log Message: garbage optimized with static buffers Index: Netchan.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/qcommon/Netchan.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Netchan.java 22 Sep 2004 19:22:09 -0000 1.4 --- Netchan.java 17 Jan 2005 21:55:45 -0000 1.5 *************** *** 119,122 **** --- 119,124 ---- } + private static final byte send_buf[] = new byte[Defines.MAX_MSGLEN]; + private static final sizebuf_t send = new sizebuf_t(); /* * =============== Netchan_OutOfBand *************** *** 127,132 **** public static void Netchan_OutOfBand(int net_socket, netadr_t adr, int length, byte data[]) { - sizebuf_t send = new sizebuf_t(); - byte send_buf[] = new byte[Defines.MAX_MSGLEN]; // write the packet header --- 129,132 ---- *************** *** 195,198 **** --- 195,200 ---- } + // private static final byte send_buf[] = new byte[Defines.MAX_MSGLEN]; + // private static final sizebuf_t send = new sizebuf_t(); /* * =============== Netchan_Transmit *************** *** 205,210 **** */ public static void Transmit(netchan_t chan, int length, byte data[]) { - sizebuf_t send = new sizebuf_t(); - byte send_buf[] = new byte[Defines.MAX_MSGLEN]; int send_reliable; int w1, w2; --- 207,210 ---- |