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

¶ÔRuby VMµÄGCµÄ˼¿¼

RubyËäÈ»ÊǶ¯Ì¬½Å±¾ÓïÑÔ£¬µ«ÊǺÍJavaÒ»Ñù£¬´øÓÐVM£¬ÓÐ×Ô¼ºµÄÄÚ´æ¶Ñ£¬´´½¨¶ÔÏóµÄʱºòÔÚ¶ÑÀïÃæ·ÖÅäÄڴ棬¶ÔÏóʹÓÃÍê±ÏÓÉGC½øÐлØÊÕ¡£µ«ÊÇͨ¹ýÎÒÃÇÔËÓªRailsÍøÕ¾Á½Äê¶àµÄʵ¼ùÀ´¿´£¬Ruby VMµÄGC»¹ÊÇ´æÔںܴóµÄÎÊÌâ¡£¼òµ¥µÄÀ´Ëµ£¬¾ÍÊÇGCÖ®ºó£¬¾¡¹Ü¶ÔÏóÒѾ­ÍêÈ«»ØÊÕ£¬µ«ÊÇÎïÀíÄÚ´æÊͷŲ»¹»³ä·Ö£¬ÓÐй©µÄÏÖÏó¡£Í¨¹ýpmapÀ´dump ruby½ø³ÌÎïÀíÄÚ´æµØÖ·Ó³Éä±í½øÐзÖÎö£¬¹Û²ìµ½rubyµÄÄÚ´æ¶Ñ×ÜÊÇÔÚ²»Í£µÄÀ©ÕÅ£¬GCÖ®ºó»ØÊÕ²»¸É¾»¡£¶øÎҶԱȹ۲ìJava VM£¬ÆäFull GCÖ®ºó£¬ÎïÀíÄÚ´æÊͷŵķdz£¸É¾»¡£ËùÒÔÓÃRuby×ö·þÎñÆ÷³¤ÆÚµÄÅÜ£¬¾Í»á·¢ÏÖRuby½ø³ÌûÓÐÀíÓɵĻºÂýй©Äڴ棬ÄÚ´æ¶Ñ»ºÂýÔö³¤£¬Ã²ËÆûÓÐÉÏÏÞ¡£
ÓÉÓÚpmapÃüÁî¿ÉÒÔdump½ø³ÌµÄÄÚ´æÓ³Éä±í£¬Òò´ËÎÒÃÇ¿ÉÒÔ¶Ô±ÈRubyVMºÍJVMÔÚGCÇ°ºóµÄÄÚ´æÓ³ÉäÇé¿ö¡£±È·½ËµRubyµÄÄÚ´æ×´¿ö´ó¸ÅÊÇÕâÑùµÄ£º
ÏÂͼÊÇÒ»¸öRuby½ø³ÌµÄÎïÀíÄÚ´æÓ³Éä±í£¬¶ÑÄÚ´æÕ¼¾ÝµÄ¿Õ¼äÊÇÎÒ³éÈ¡³öÀ´µÄÈýÐУº
Ruby´úÂë
00000000005d4000 125260K rwx--    [ anon ]   
0000002a95c23000  23456K rw---    [ anon ]   
0000002a99186000  50980K rw---    [ anon ]  
00000000005d4000 125260K rwx-- [ anon ]
0000002a95c23000 23456K rw--- [ anon ]
0000002a99186000 50980K rw--- [ anon ]
Ruby´úÂë
0000000000400000    760K r-x--  /usr/local/ruby/bin/ruby   
00000000005bd000     92K rw---  /usr/local/ruby/bin/ruby   
00000000005d4000 125260K rwx--    [ anon ]   
0000002a95556000     84K r-x--  /lib64/ld-2.3.3.so   
0000002a9556b000     12K rw---    [ anon ]   
0000002a9556e000     24K r--s-  /usr/lib64/gconv/gconv-modules.cache   
0000002a95574000      4K rw---    [ anon ]   
0000002a95577000


Ïà¹ØÎĵµ£º

rubyÎļþ´ÓÃüÁîÐÐÖнÓÊÕ²ÎÊý£¨È«¾Ö±äÁ¿£ºARGV)


ÏÂÎÄת×Ô£º
http://www.cnblogs.com/watir/archive/2009/04/25/1443440.html
rubyÎļþ´ÓÃüÁîÐÐÖнÓÊÕ²ÎÊý
ÔÚÃüÁîÐз½·¨Ö´ÐÐrubyÎļþʱ£¬ÐèÒª´ÓÃüÁîÐÐÖд«Èë²ÎÊý£¬¿ÉÒÔʹÓÃÈ«¾Ö±äÁ¿£ºARGV
ÈçÓÐruby Îļþtest.rb,ÄÚÈÝÈçÏ£º
1 def hello(a)
2   puts a
3 end

5  ......

RubyϽâ¾öoci8°²×°´íÎóµÄÎÊÌâ

Prepare
1. Download 'OCI 1.x.x.rb' (it's VERY important - execution MUST be *.rb)
2. Download 'oci8lib.so'
Install
1. Copy 'OCI8.rb' to .../ruby/lib/ruby/site_ruby/1.8/DBD/OCI8
2. Copy 'oci8.rb' to .../ruby/lib/ruby/site_ruby/1.8
3. Copy 'oci8lib.so' to .../ruby/lib/ruby/site_ruby/1.8/i386-msv ......

Cassandra in Action with Twitter's Ruby Client

ÓÐÒ»¸öȫеÄÏîÄ¿£¬ÒòΪ¿¼Âǵ½½«À´µÄÊý¾ÝÀ©Õ¹ÐÔÄÜ£¬ËùÒÔ¿¼ÂÇÓÃCassandra×öÊý¾Ý´æ´¢£¬Ç°¶ËÓÃLighttpd + FastCGI + Rails¡£ÔÚʹÓÃCassandraµÄʱºò£¬¾õµÃÓÐһЩ¶«Î÷¿ÉÄÜ´ó¼Ò¶¼ÐèÒª£¬¾ÍдÁËÒ»¸ö¼òµ¥µÄÖ¸ÄÏ¡£ÒòΪÄÚÈݱȽϳ¤£¨16Ò³£©£¬¾ÍŪÁ˸öPDFÎļþ¸ø´ó¼ÒÏÂÔØ¡£
Cassandra in Action with Twitter's Ruby Client.pdf
Èç¹ûÏÂÔ ......

ruby Óï·¨

±¾ÎÄת×Ô:
http://hi.baidu.com/24xinhui/blog/item/9f52dd34382e11325ab5f553.html
ruby-Óï·¨
2009Äê06ÔÂ20ÈÕ ÐÇÆÚÁù ÉÏÎç 00:21
http://www.blogjava.net/xxllnnn/archive/2009/01/18/251762.html
http://www.cnblogs.com/cnblogsfans/archive/2009/01/24/1380804.html
__setobj__ £¨2009-7-14£©
  &nbs ......

rubyѧϰ±Ê¼Ç

1. ½øÖƵĿì½Ýת»»
"100".to_i(2) , ½«100×÷Ϊ¶þ½øÖÆÊä³öÊ®½øÖÆÊý£¬
½á¹û £º 4
"100".to_i(9), ¾Å½øÖÆ£¬
½á¹û£º 81
"100".to_i(16), Ê®Áù»úÖÆ£¬
½á¹û£º 256
±È½Ï˧£¬×Ö·û´®×ª»»ÔÚvc±à³ÌÀïÃæ±È½ÏÍ·ÌÛ¡£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ