Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Ò»ÖÖ¶¨Î»ÄÚ´æй¶µÄ·½·¨£¨Linux£©

Ä¿µÄ£º
±¾ÎÄÊÇ¡¶Ò»ÖÖ¶¨Î»ÄÚ´æй¶µÄ·½·¨£¨Solaris£©¡·¶ÔÓ¦µÄLinux°æ±¾£¬µ÷ÊÔÆ÷ʹÓÃgdb¡£Ö÷Òª½éÉÜʵÀý²¿·Ö¡£ÆäËûÇë¼û¡¶Ò»ÖÖ¶¨Î»ÄÚ´æй¶µÄ·½·¨£¨Solaris£©¡·¡£
ʵÀý£º
Ä£Äânewʧ°ÜµÄ³ÌÐò£º
#include <stdexcept>
class ABC
{
public:
        virtual ~ABC(){}
        int i;
        int j;
};
 
void f()
{
        for (int i = 0; i < 1000; ++i)
        {
                ABC* p = new ABC;
        }
        throw std::bad_alloc();
}
 
int main()
{
        f();
        return 0;
}
1£© ±àÒëÔËÐд˶δúÂë¡£²úÉúÒ»¸öcoreÎļþ
2£© ÓÃgdb´ò¿ªÕâ¸öcoreÎļþ£º
gdb a.out core
(gdb) run
Starting program: /test/new_fail/a.out
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
 
Program received signal SIGABRT, Aborted.
0x00007ffff733f645 in raise () from /lib64/libc.so.6
(gdb) info proc
process 10683
cmdline = '/test/new_fail/a.out'
cwd = '/test/new_fail'
exe = '/test/new_fail/a.out'
(gdb) shell pmap 10683
10683: a.out
START               SIZE     RSS     PSS   DIRTY    SWAP PERM MAPPING
0000000000400000      4K      4K      4K      0K      0K r-xp /test/new_fail/a.out
0000000000600000      4K      4K      4K      4K      0K r--


Ïà¹ØÎĵµ£º

Linux iptableÎĵµ

×ÜÀÀ
ÓÃiptables -ADC À´Ö¸¶¨Á´µÄ¹æ
Ôò
£¬-AÌí¼Ó -Dɾ³ý -C ÐÞ¸Ä
iptables - [RI] chain rule num rule-specification[option]
ÓÃiptables - RI ͨ¹ý¹æÔòµÄ˳ÐòÖ¸¶¨
iptables -D chain rule num[option]
ɾ³ýÖ¸¶¨¹æÔò
iptables -[LFZ] [chain][option]
ÓÃiptables -LFZ Á´Ãû [Ñ¡Ïî]
iptables -[NX] chain
ÓÃ -NX ......

Linux ÎļþºÍĿ¼µÄÊôÐÔ


Linux ÎļþºÍĿ¼µÄÊôÐÔ
×÷Õߣº±±ÄÏÄϱ±
À´×Ô£ºhttp://www.linuxsir.org/main/?q=node/196
ÕªÒª£º±¾ÎĽ²ÊöµÄÊÇÎļþ»òĿ¼µÄÊôÐÔ£¬±ÈÈç½Úµãinode¡¢ÎļþÀàÐÍ¡¢ÎļþȨÏÞ¼°¹éÊô£»»¹¶Ôsetuid¡¢setgid¼°Õ³Ìùλ½øÐÐÁËÒ»°ãÐԵĽ²½â¡£¶Ôln
¡¢chmod¡¢umask¡¢chown¡¢chgrp ¡¢touch µÄÓ÷¨Ò²½øÐÐÁ˱ȽÏÏêϸµÄ˵Ã÷ºÍ¾ÙÀý£»
Ŀ¼ ......

S3C24XXÌåϵµÄLinux GPIO¿ØÖÆÏà¹ØAPIʵÏÖ


GPIO£¨General Purpose Input/OutputµÄËõд£©¾ÍÊÇоƬµÄÒý½Å£¬Òý½ÅÊǿɱà³ÌµÄ¿É¶ÔÒý½ÅµÄ¹¤×÷ģʽ½øÐÐÉèÖãºÊäÈëģʽ(¼ì²âÊäÈëÐźÅ)£¬Êä³öģʽ(Êä³ö0»ò1)£¬¸ß×è״̬(³£ÓÃÓÚADת»»)£¬»¹ÓнûÖ¹»òÔÊÐíÉÏÄÚ²¿ÏÂÀ­µç×è(ÉÏÀ­£º¹Ü½Åͨ¹ýµç×è½Ó¸ßµçƽ£¬ÏÂÀ­£º¹Ü½Åͨ¹ýµç×è½ÓµØ£¬Ò²¿ÉÒÔÍⲿ½ÓÉÏÀ­»òÏÂÀ­µç×è)£¬»¹ÓйܽŸ´Óõȹ¦ÄÜ£¬ ......

linuxµÄÎļþºÍĿ¼

chmod £»ÐÞ¸ÄĿ¼ȨÏÞ
eg£ºchmod o-t /tmp
touch:´´½¨ÐÂÎļþ
rm -rf:ɾ³ýÎļþ
set gid ¶ÔĿ¼µÄ×÷ÓÃ
1£ºÄ¬ÈÏÇé¿öÏ£¬Óû§½¨Á¢µÄÎļþÊôÓÚÓû§µ±Ç°ËùÔÚµÄ×é
2£ºÄ¿Â¼ÉÏÉèÖÃÁËsetgid£¬±íʾÔÚ´ËĿ¼ÖУ¬ÈκÎÈ˽¨Á¢µÄÎļþ£¬¶¼»áÊôÓÚĿ¼ËùÊôµÄ×é¡£
rm -rf test  //ɾ³ý֮ǰµÄtestĿ¼
mkdir test // ÔÚµ±Ç°Ä¿Â¼´´½¨Ò ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ