dz̸CÄÚ´æ·ÖÅä1
¹ØÓÚCÓïÑÔÄÚ´æ·½ÃæµÄ»°ÌâÒªÕæËµÆðÀ´µÄ»°Äǿ֞ÍûͷÁË£¬ËùÒÔ±¾ÎĽö½öÊÇÒ»¸ödz̸¡£
¹ØÓÚÄÚ´æÎÊÌâ
²»Í¬Æ½Ì¨Ö®¼äÓÐÒ»¶¨µÄÇø±ð¡£±¾ÎÄËùÖ¸µÄƽ̨ÊÇx86µÄLinux
ƽ̨
ÓÃCÓïÑÔ×ö³ÌÐò£¨ÆäʵÆäËûÓïÑÔÒ²Ò»Ñù£©£¬²»½öÒªÊìϤÓï·¨£¬ÆäʵºÜ¶àÏà¹ØµÄ±³¾°ÖªÊ¶Ò²ºÜÖØÒª¡£ÔÚѧϰºÍÑо¿CÓïÑÔÖÐÄÚ´æ·ÖÅäµÄÎÊÌâǰ£¬Ê×ÏÈÒªÁ˽âÒ»ÏÂLinux·ÖÅ䏸½ø³Ì£¨ÔËÐÐÖеijÌÐò£©µÄµØÖ·¿Õ¼äÊÇʲôÑùµÄ¡£
×ܵÄÀ´ËµÓÐ3¸ö¶Î£¬¼´´úÂë¶Î£¬Êý¾Ý¶ÎºÍ¶ÑÕ»¶Î£¨Ñ§¹ý»ã±àµÄÅóÓÑÒ»¶¨ºÜÊìϤÁË£©¡£´úÂë¶Î¾ÍÊÇ´æ´¢³ÌÐòÎı¾µÄ£¬ËùÒÔÓÐʱºòÒ²½Ð×öÎı¾¶Î£¬Ö¸ÁîÖ¸ÕëÖеÄÖ¸Áî¾ÍÊÇ
´ÓÕâÀïÈ¡µÃ¡£Õâ¸ö¶ÎÒ»°ãÊÇ¿ÉÒÔ±»¹²ÏíµÄ£¬±ÈÈçÄãÔÚLinux¿ªÁË2¸öViÀ´±à¼Îı¾£¬ÄÇôһ°ãÀ´ËµÕâÁ½¸öViÊǹ²ÏíÒ»¸ö´úÂë¶ÎµÄ£¬µ«ÊÇÊý¾Ý¶Î²»Í¬£¨ÕâµãÓÐ
µãÀàËÆC++ÖÐÀàµÄ²»Í¬¶ÔÏó¹²ÏíÏàͬ³ÉÔ±º¯Êý£©¡£Êý¾Ý¶ÎÊÇ´æ´¢Êý¾ÝÓõ쬻¹¿ÉÒԷֳɳõʼ»¯Îª·ÇÁãµÄÊý¾ÝÇø£¬BSS£¬ºÍ¶Ñ(Heap)Èý¸öÇøÓò¡£³õʼ»¯·ÇÁã
Êý¾ÝÇøÓòÒ»°ã´æ·Å¾²Ì¬·ÇÁãÊý¾ÝºÍÈ«¾ÖµÄ·ÇÁãÊý¾Ý¡£BSSÊÇBlock Started by
SymbolµÄËõд£¬Ô±¾ÊÇ»ã±àÓïÑÔÖеÄÊõÓï¡£¸ÃÇøÓòÖ÷Òª´æ·Åδ³õʼ»¯µÄÈ«¾ÖÊý¾ÝºÍ¾²Ì¬Êý¾Ý¡£»¹ÓоÍÊǶÑÁË£¬Õâ¸öÇøÓòÊǸø¶¯Ì¬·ÖÅäÄÚ´æÊÇʹÓõģ¬Ò²¾ÍÊÇÓÃ
mallocµÈº¯Êý·ÖÅäµÄÄÚ´æ¾ÍÊÇÔÚÕâ¸öÇøÓòÀïµÄ¡£ËüµÄµØÖ·ÊÇÏòÉÏÔö³¤µÄ¡£×îºóÒ»¸ö¶ÑÕ»¶Î£¨×¢Ò⣬¶ÑÕ»ÊÇStack,¶ÑÊÇHeap£¬²»ÊÇͬһ¸ö¶«Î÷£©£¬¶Ñ
Õ»¿ÉÌ«ÖØÒªÁË£¬ÕâÀï´æ·Åמֲ¿±äÁ¿ºÍº¯Êý²ÎÊýµÈÊý¾Ý¡£ÀýÈçµÝ¹éËã·¨¾ÍÊÇ¿¿Õ»ÊµÏֵġ£Õ»µÄµØÖ·ÊÇÏòÏÂÔö³¤µÄ¡£¾ßÌåÈçÏ£º
========¸ßµØÖ· =======
³ÌÐòÕ» ¶ÑÕ»¶Î
ÏòÏÂÔö³¤
“¿Õ¶´” =======
ÏòÉÏÔö³¤
¶Ñ
------ Êý¾Ý¶Î
BSS
------
·ÇÁãÊý¾Ý
=========µÍµØÖ· =======
========= =======
´úÂë ´úÂë¶Î
========= =======
ÐèҪעÒâµÄÊÇ£¬´úÂë¶ÎºÍÊý¾Ý¶ÎÖ®¼äÓÐÃ÷È·µÄ·Ö¸ô£¬µ«ÊÇÊý¾Ý¶ÎºÍ¶ÑÕ»¶ÎÖ®¼äûÓУ¬¶øÇÒÕ»ÊÇÏòÏÂÔö³¤£¬¶ÑÊÇÏòÉÏÔö³¤µÄ£¬Òò´ËÀíÂÛÉÏÀ´Ëµ¶ÑºÍÕ»»á“Ôö³¤µ½Ò»Æð”£¬µ«ÊDzÙ×÷ϵͳ»á·ÀÖ¹
Ïà¹ØÎĵµ£º
C/SÊÇClient/ServerµÄËõд¡£·þÎñÆ÷ͨ³£²ÉÓøßÐÔÄܵÄPC¡¢¹¤×÷Õ¾»òСÐÍ»ú£¬²¢²ÉÓôóÐÍÊý¾Ý¿âϵͳ£¬ÈçOracle¡¢Sybase¡¢Informix»ò SQL Server¡£¿Í»§¶ËÐèÒª°²×°×¨ÓõĿͻ§¶ËÈí¼þ¡£
B/S ÊÇBrower/ServerµÄËõд£¬¿Í»§»úÉÏÖ»Òª°²×°Ò»¸öä¯ÀÀÆ÷£¨Browser£©£¬ÈçNetscape Navigator»òInternet Explorer£¬·þÎñÆ÷°²×°Oracle¡¢Sybase¡¢In ......
9)LinuxÏÂC¿ª·¢¹¤¾ß½éÉÜ
LinuxµÄ·¢ÐаæÖаüº¬Á˺ܶàÈí¼þ¿ª·¢¹¤¾ß. ËüÃÇÖеĺܶàÊÇÓÃÓÚ C ºÍ C++Ó¦ÓóÌÐò¿ª·¢
µÄ. ±¾ÎĽéÉÜÁËÔÚ Linux ÏÂÄÜÓÃÓÚ C Ó¦ÓóÌÐò¿ª·¢ºÍµ÷ÊԵŤ¾ß. ±¾ÎĵÄÖ÷Ö¼ÊǽéÉÜÈç
ºÎÔÚ Linux ÏÂʹÓà C ±àÒëÆ÷ºÍÆäËû C ±à³Ì¹¤¾ß, ¶ø·Ç C ÓïÑÔ±à³ÌµÄ½Ì³Ì.
GNU C ±àÒëÆ÷
GNU C ±àÒëÆ÷(GCC)ÊÇÒ»¸öÈ«¹¦Ä ......
JavaÓïÑÔ±¾Éí¾ßÓÐ¿çÆ½Ì¨ÐÔ£¬Èç¹ûͨ¹ýJavaµ÷ÓÃDLLµÄ¼¼Êõ·½±ãÒ×Óã¬Ê¹ÓÃJava¿ª·¢Ç°Ì¨½çÃæ¿ÉÒÔ¸ü¿ìËÙ£¬Ò²ÄÜ´øÀ´¿çƽ̨ÐÔ¡£
Javaµ÷ÓÃC/C++дºÃµÄDLL¿âʱ£¬ÓÉÓÚ»ù±¾Êý¾ÝÀàÐͲ»Í¬¡¢Ê¹ÓÃ×Ö½ÚÐòÁпÉÄÜÓвîÒ죬ËùÒÔÔÚ²ÎÊý´«µÝ¹ý³ÌÖÐÈÝÒ׳öÏÖÎÊÌ⣬DLLÖпÉÄÜÐèÒª×öÏàÓ¦µÄת»»¡£
ʹÓÃJavaµ÷ÓÃDLL¶¯Ì¬Á´½Ó¿âµÄ·½°¸Í¨³£ÓÐÈýÖÖ£ºJNI, Ja ......
»ùÓÚÓÅÏȼ¶µÄ²Ù×÷ϵͳ£¨preemptive operating system£©±ØÐëʹÓÃijÖÖËã·¨ÒÔ¾ö¶¨CPUÈçºÎµ÷¶ÈϵͳÖеÄỊ̈߳¬±¾Õ½«ÌÖÂÛWindows VistaʹÓõĵ÷¶ÈËã·¨¡£ ÎÒÃÇ֮ǰÌÖÂÛ¹ýÏ̵߳ÄÉÏÏÂÎĽṹCONTEXT£¬ÆäÖк¬ÓÐÏß³Ì×îºóÒ»´ÎÖ´ÐÐʱCPU¼Ä´æÆ÷×éµÄ״̬¡£ ²Ù×÷ϵͳÿ20ºÁÃë¼ì²éϵͳÖÐËùÓÐÏß³ÌÄں˶ÔÏóµÄ״̬£¬ÆäÖÐһЩ¶ÔÏó±»ÈÏΪÊǿɵ÷¶È£ ......
º¯Êý - ÉùÃ÷¡¢¶¨Òå¡¢µ÷ÓÃ
¡¡¡¡1. Èç¹ûº¯ÊýûÓÐÉùÃ÷, Ó¦¸ÃÔÚµ÷ÓÃǰ¶¨Òå:
#include¡¡<stdio.h>
/*¡¡¶¨ÒåÇó´óÖµº¯Êý¡¡*/
int¡¡MAX(int¡¡x,¡¡int¡¡y)¡¡{
¡¡¡¡if¡¡(x¡¡>¡¡y)
¡¡¡¡¡¡¡¡return¡¡x;
¡¡¡¡else
¡¡¡¡¡¡¡¡return¡¡y;
}¡¡
/*¡¡¶¨ÒåÇóСֵº¯Êý¡¡*/
int¡¡MIN(int¡¡x,¡¡int¡¡y)¡¡{
¡¡¡¡return¡¡x¡¡&l ......