'2012/03/12'에 해당되는 글 3건

  1. 2012.03.12 iproute2 (tc)
  2. 2012.03.12 maven의 settings.xml 파일 위치
  3. 2012.03.12 struct 초기화 - memset

iproute2 (tc)

c or linux 2012. 3. 12. 22:55

http://www.tldp.org/HOWTO/Traffic-Control-HOWTO/software.html#s-iproute2

iproute2 is a suite of command line utilities which manipulate kernel structures for IP networking configuration on a machine.

네트워크 bandwidth를 control할 수 있는 utility
Posted by '김용환'
,

많은 프로젝트가 있을 때 굳이 pom.xml에 기술하는 것보다 하나의 파일로 관리하는 게 편할 수 있다.
 profile, mirror를 공통관리함으로서 pom.xml 파일을 적당히 관리한다.

${user.home}/.m2/settings.xml


Posted by '김용환'
,

통신, 파일과 관련해서 read 할때, 쓰레기값도 같이 읽을 수 있기 때문에 memset은 기본적으로 하는 것이 좋다. 나중에 문제가 커지지 않는 안티 버그 습관이랄까..

open jdk의 소스 패치를 보면서, 얘네들도 실수해서 코딩하기도 하는구나.. 하는 것을 알게 된다.


http://cr.openjdk.java.net/~zhangshj/7152948/webrev.00/ 
  {
      jint fd = fdval(env, fdo);
      ssize_t result = 0;
      struct iovec *iov = (struct iovec *)jlong_to_ptr(address);
      struct msghdr m;
+     // initialize the message
+     memset(&m, 0, sizeof(m));
      if (len > 16) {
          len = 16;
      }
  
      m.msg_iov = iov;
      m.msg_iovlen = len;
  
      result = recvmsg(fd, &m, 0);
      if (result < 0 && errno == ECONNREFUSED) {
          JNU_ThrowByName(env, JNU_JAVANETPKG "PortUnreachableException", 0);
          return -2;


 

'c or linux' 카테고리의 다른 글

리눅스 메모리 관련 파라미터  (0) 2012.04.02
iproute2 (tc)  (0) 2012.03.12
라인 피드 문제  (0) 2012.03.08
리눅스 및 MMU 가상메모리 공부  (1) 2012.02.22
리눅스에서 디스크 용량 체크  (0) 2012.02.07
Posted by '김용환'
,