[太陽花學運] 2014年3月18日 台灣人民佔領立法院行動 反對黑箱服貿

圖片
繼台灣公民記者JO1YNN在美國有線電視新聞網CNN的 iReport ( Taiwan Parliament Occupied by protesters 1st time in History )上。報導台灣「318人民佔領立法院行動」首次佔領立法院議場世界各大重要外電媒體紛紛加以報導。 Arys Chien's status update .: 【 為何學生要佔領立法院,反對黑箱服貿?】 我知道有的朋友平常沒 留意,現在一時看不太懂;我試著用另一種方式簡單說明看看。   會計偷偷抱著公司所有的資產,要去抵押借高利貸。 老闆發現了,趕緊說:「不行啊那是高利貸!」 會計:「我是為公司好!」 老闆:「那起碼告訴我,是哪家高利貸、多少錢、利息怎麼算?」 會計:「我先去借,你之後會慢慢感受到!」 老闆:「那也讓我們開個會討論吧!」 會計:「我趁你不在的時候發開會通知,你沒來,所以就算通過了。 」 老闆要攔會計、會計把自己座位鎖起來,老闆只好請人來包圍會計的 座位,並且設法強行進入;進入後亂翻會計抽屜,想找到公司資產。   以上。   會計 = 政府 老闆 = 台灣人民 高利貸 = 服貿 (沒錯,政府是人民雇用來辦事的職員,看薪水哪裡來的就很清楚了 ) (高利貸不是不能借,只是不能這樣搞啊......)  ( 來源: 我是台灣人粉絲團  )

how to trace memory leak in Android ?

this post is really a question, doesn't contain the answer Orz


this big question may consist of several items


what is memory leak ? 


how  to monitor Android system memory and performance ?



linux command :


ps -x
top
cat /proc/meminfo


not know exactly : 


dumpsys meminfo proc-id
procrank
time command-line
vmstat


and DDMS (Android SDK tool) !!


Could automatic track memory leak on Android ?


DDMS could help !


but need to do some settings ( group discuss Finding Memory leak in native code )


0. Build libc_debug.so 


1. replace system/lib/libc.so with /system/lib/libc_debug.so 


2. set environment variables 



 $PATH with ~/open_src/prebuilt/linux-x86/toolchain/arm-eabi-XXX/bin
 $ANDROID_PRODUCT_OUT with ~/open_src/out/target/product/



'PATH' is used for getting "arm-eabi-addr2line" and
ANDROID_PRODUCT_OUT for getting the path to /symbol folder. 




3. restart the framework.  


adb shell stop && adb shell start 


4. Add "native=true" to  ~/.android/ddms.cfg


5. start the stand-alone version of DDMS.  -> "Native Heap" 


but just know that there  was an malloc @@ !!


how to avoid memory leak in application ?


from Avoid memory leaks on Android suggestion:




  • Do not keep long-lived references to a context-activity (a reference to an activity should have the same life cycle as the activity itself)
  • Try using the context-application instead of a context-activity
  • Avoid non-static inner classes in an activity if you don’t control their life cycle, use a static inner class and make a weak reference to the activity inside



to be continued ...



留言

本月熱門文章

網路創業大不易 ? 真的要親自體會才知道!

推薦韓劇 機智的醫生生活 充滿友情的五人組 Mido and Falasol

新北市線上都更說明會,一起來改善現在的居住環境

模里西斯六日行程推薦 來規劃南半球海島行吧!!

Bonbons Studio 胖胖瑪德蓮 中秋禮盒開箱

來看一下2011年數位時代選的三十強官方網站

20221018 詹智堯1000場出賽 賽後引退 將繼續以富邦悍將外野守備教練身分在中華職棒奮鬥

11/26 星期六早上八點就可以投票啦

指揮中心自10月13日起調整自主防疫期間醫療防疫措施

Amazon/ AWS 領導力準則 14 Amazon Leadership Principles