STLµÄÒ»¸öºÃ´¦¾ÍÊÇÊ¡È¥×Ô¼º¹ÜÀíÄÚ´æµÄÂé·³£¬µ«ÊÇÎÒ·¢ÏÖÔÚWindowsÉÏÓÃboundChecker¼ì²éÄÚ´æʱ£¬×ÜÊÇ»á¸ú×Ùµ½stlµÄº¯ÊýÄÚ²¿¡£×î½üÔÚLinuxÏÂʹÓÃvalgrind¼ì²éÄÚ´æй¶ÓÖÅöµ½ÕâÀàÎÊÌâ¡£
±ÈÈ磺
23,416 bytes in 1 blocks are possibly lost in loss record 23 of 33
at 0x401AFE7: operator new(unsigned int) (vg_rep ......
ÎÒÐèÒª×öÒ»¸ö¼ÆʱÆ÷£¬ÒªÇóÿ¸ô12.5ms£¨ºÁÃ룩×Ô¶¯¼Ó1.Ôõô×öµ½£¬ËÓÐÏà¹ØµÄ·½·¨¡£ÎÒÓùýselect£¬ºÃÏñ²»ÐУ¡usleep¾Í¸ü²»ÓÃ˵Á˿϶¨Ò²²»ÐУ¡ ÎÒ¿´ÓÐÈË˵ÓÃpselect£¬ÎÒ»¹Ã»ÊÔ£¬²»¹ý¸Ð¾õ¿ÖÅÂÒ²²»ÐÐŶ¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£
usleep()ÊÇ΢Ã뼶±ðµÄÑÓʱÄÄÀï²»ÐУ¿
gettimeofday() Ó¦¸ÃÒ²¿ÉÒÔ°É
²»ÂÛÊÇÄĸösleep ......
http://hqlong.com/2009/06/800.html/comment-page-1 ¿´µ½ÁËÕâƪ½Ì³Ì£¬¿ÉÊÇÓÐһЩ²»Àí½âµÄ£¬×¢ÊͳöÀ´ÁË£¬ÔÚwhileÑ»·ÀïÃ棬ϣÍû´ïÈËÄܽâÊÍÒ»ÏÂ
C/C++ code:
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#includ ......
СµÜ×î½üÔÚѧlinux£¬ÔÚVMÉÏ×°µÄrhel 4 £¬Ô¶³ÌͼÐηÃÎÊÅäºÃÁË£¬ÓõÄxming.
/etc/inittabÅäÖÃÈçÏÂ
id:5:initdefault:
# Run xdm in runlevel 5
x:5:respawn:/etc/X11/prefdm -nodaemon
rhel4»ù±¾²»ÓøÄÕâÀï¾Í¿ÉÒÔÔ¶³ÌÁ¬½ÓÉÏ¡£
ÓÃÔ¶³ÌͼÐηÃÎʱØÐërunlevelΪ5 Âð£¿
ÏëÇë½ÌÄܲ»Äܳõʼ»¯Ä¬ÈÏ ......
ÎÒÃÇ×öÒ»¸öÖ°¹¤¹ÜÀíϵͳ£¬ÀÏʦҪÇó×ö¸öµÇ¼£¬ÃÜÂëÒªÆÁ±Î³ÉÐǺţ¬ÇóÖú¸÷λ¸ßÊÖ°ïæ½â¾öÏ£¬²»Ê¤¸Ð¼¤£¡
ÎÒÒ²Óà linux £¬ºÃÏóÔÚ linux ÏÂÊäÈë×Ö·û²»»ØÏÔ»òÕß°ÑÊäÈë×Ö·û»»Îª £ª ºÅ£¬ÄѶȲ»Ð¡¡£
http://unix-cd.com/unixcd12/article_7078.html
¿´¿´Õâ¸öÓÐûÓÐÓÃÄØ£¿
ÊäÈ뼸¸öÊý¾Í´òÓ¡¼¸¸ö*²»¾Í¿ÉÒÔ ......
ÈçÌâ,ÓÐʲôÃüÁî¿ÉÒԲ鿴µ±Ç°ÊÇ·ñ»¹ÓпÉÓõĶ˿ÚÂð?лл
ΪʲôÐèÒª²é¿´£¿socketµÄÁÙʱ¶Ë¿Ú²»ÊÇ»á×Ô¶¯·ÖÅäµÄô
netstat -an
netstat -an | grep -v "ÒÑÁ¬½Ó" | grep -v "LISTENING"
netstat -an ¾Í¿ÉÒÔ
netstat -an
ÎÒÒ»Ö±ÔÚÓÃ.Õâ¸ö²éµÄ¶¼Êǵ±Ç°ÔÚʹÓõĶ˿ڰ¡??Õ¦¿´»¹ÓÐûÓпÉÓõĶ˿ ......