- function template有type deduction
- function template 沒有 default template argument
- function template 沒有 partial specialization
Wednesday, November 23, 2011
function template
function template 與class template不同的地方在於
Thursday, November 17, 2011
maguro tuna
新的build system裡
有maruro まぐろ tuna つな
其實還有toro とろ 但還沒放上AOSP
都在這有說明
https://groups.google.com/group/android-building/browse_thread/thread/ab34b1144a96bcd8
有maruro まぐろ tuna つな
其實還有toro とろ 但還沒放上AOSP
都在這有說明
https://groups.google.com/group/android-building/browse_thread/thread/ab34b1144a96bcd8
Tuesday, November 15, 2011
LOCAL_DEX_PREOPT
今天抓了Icecream 的AOSP
然後隨便build一個apk
發現apk竟然不能裝
INSTALL_FAILED_DEXOPT
發現apk裡的classes.dex不見了
跑到外面來變odex
看了一下build system的code
原來是新的要加上 LOCAL_DEX_PREOPT := false
他才不會幫你作pre-dexopt的動作
然後隨便build一個apk
發現apk竟然不能裝
INSTALL_FAILED_DEXOPT
發現apk裡的classes.dex不見了
跑到外面來變odex
看了一下build system的code
原來是新的要加上 LOCAL_DEX_PREOPT := false
他才不會幫你作pre-dexopt的動作
Monday, November 14, 2011
function overloaded by return type
http://stackoverflow.com/questions/442026/function-overloading-by-return-type
這篇用了很多例子來說明
very detail post
這篇用了很多例子來說明
very detail post
Thursday, November 10, 2011
build simulator
build simulator是build一個跑在x86上的android
不過這功能到了後面就沒在maintain了
但還是試了一下
果真要改很多地方
my AOSP codebase
gingerbread-release
GRI40
[ 11-10 12:25:06 10884 W/Packag]
Exception reading AndroidManifest.xml in /system/framework/framework-res.apk
java.lang.SecurityException: /system/framework/framework-res.apk failed verification of META-INF/CERT.SF
at java.util.jar.JarVerifier.failedVerification(JarVerifier.java:135)
at java.util.jar.JarVerifier.verifyCertificate(JarVerifier.java:313)
at java.util.jar.JarVerifier.readCertificates(JarVerifier.java:265)
at java.util.jar.JarFile.getInputStream(JarFile.java:389)
at android.content.pm.PackageParser.loadCertificates(PackageParser.java:342)
at android.content.pm.PackageParser.collectCertificates(PackageParser.java:485)
at com.android.server.PackageManagerService.collectCertificatesLI(PackageManagerService.java:2570)
at com.android.server.PackageManagerService.scanPackageLI(PackageManagerService.java:2656)
at com.android.server.PackageManagerService.scanDirLI(PackageManagerService.java:2514)
at com.android.server.PackageManagerService.(PackageManagerService.java:930)
at com.android.server.PackageManagerService.main(PackageManagerService.java:694)
at com.android.server.ServerThread.run(SystemServer.java:148)
[ 11-10 12:25:06 10884 E/Packag]
Package android has no certificates at entry AndroidManifest.xml; ignoring!
不過這功能到了後面就沒在maintain了
但還是試了一下
果真要改很多地方
my AOSP codebase
gingerbread-release
GRI40
- framework
- strchr return type : const char * -> char * : const_cast
(strchr(..)) - media/libmedia/MediaScanner.cpp
- media/libstagefright/NuHTTPDataSource.cpp
- media/libstagefright/httplive/M3UParser.cpp
- media/libstagefright/rtsp/MyHandler.h
- media/libstagefright/rtsp/ASessionDescription.cpp
- external/gtest
- Android.mk : remove external/stlport/stlport in libgtest_includes (stlport wont be built for simulator, so we try not to include stlport's headers )
- external/libnfc-nxp
- Android.mk
- remove libdl in LOCAL_SHARED_LIBRARIES (libdl wont be build for simulator, and we also need to modify build scripts to make it link against to libdl on my host pc)
- remove -mapcs -mno-sched-prolog -mabi=aapcs-linux -mno-thumb-interwork in LOCAL_CFLAGS
- add LOCAL_C_INCLUDES := bionic/libc/kernel/common for libnfc
- Linux_x86/phDal4Nfc_i2c.c
- add "#include
- Linux_x86/phDal4Nfc.c
- add "#include
- remove line 664: pthread_setname_np(pthread_self(), "reader");
- development/simulator/
- app/DeviceWindow.cpp
- line 175: bool hasAlpha = onionSkinImage.HasAlpha(); -> bool hasAlpha = onionSkinImage.GetAlpha() != NULL;
- app/MainFrame.cpp
- remove line 239, 280 : menuHelp->AppendSeparator();
- build
- core/combo/TARGET_linux-x86.mk
- TARGET_GLOBAL_LDFLAGS := $(HOST_GLOBAL_LDFLAGS) -m32 -lpthread -ldl -lrt
- packages/apps/Nfc
- ./jni/com_android_nfc.h
- add "#include
although I can build a simulator
but it still cannot run Android well
[ 11-10 12:25:06 10884 W/Packag]
Exception reading AndroidManifest.xml in /system/framework/framework-res.apk
java.lang.SecurityException: /system/framework/framework-res.apk failed verification of META-INF/CERT.SF
at java.util.jar.JarVerifier.failedVerification(JarVerifier.java:135)
at java.util.jar.JarVerifier.verifyCertificate(JarVerifier.java:313)
at java.util.jar.JarVerifier.readCertificates(JarVerifier.java:265)
at java.util.jar.JarFile.getInputStream(JarFile.java:389)
at android.content.pm.PackageParser.loadCertificates(PackageParser.java:342)
at android.content.pm.PackageParser.collectCertificates(PackageParser.java:485)
at com.android.server.PackageManagerService.collectCertificatesLI(PackageManagerService.java:2570)
at com.android.server.PackageManagerService.scanPackageLI(PackageManagerService.java:2656)
at com.android.server.PackageManagerService.scanDirLI(PackageManagerService.java:2514)
at com.android.server.PackageManagerService.
at com.android.server.PackageManagerService.main(PackageManagerService.java:694)
at com.android.server.ServerThread.run(SystemServer.java:148)
[ 11-10 12:25:06 10884 E/Packag]
Package android has no certificates at entry AndroidManifest.xml; ignoring!
out-of-class member template definition
在Modern C++ Design的第五章裡看到了
template
template
Functor::Functor(const Fun& fun)
: spImpl_(new FunctorHandler(fun));
{
}
這就是 out-of-class member template definition
前面的template 是給class的template
後面的template 是給function(cstor)的template
這也有類似的例子
http://stackoverflow.com/questions/5895179/syntax-of-out-of-class-definition-of-a-template-member-function-of-a-template-cl
template
template
Functor
: spImpl_(new FunctorHandler
{
}
這就是 out-of-class member template definition
前面的template
後面的template
這也有類似的例子
http://stackoverflow.com/questions/5895179/syntax-of-out-of-class-definition-of-a-template-member-function-of-a-template-cl
Monday, November 7, 2011
stack frame alignment
除了structure alignment 外
還有stack frame alignment
http://stackoverflow.com/questions/8004458/compiler-g-seems-to-allocate-more-memory-for-instances-of-classes-than-it-ne
不過有篇post也討論為啥要在32bit上也要用16 byte
不過他好像沒討論出什麼!?
http://blogs.embarcadero.com/abauer/2010/01/14/38904
還有stack frame alignment
http://stackoverflow.com/questions/8004458/compiler-g-seems-to-allocate-more-memory-for-instances-of-classes-than-it-ne
不過有篇post也討論為啥要在32bit上也要用16 byte
不過他好像沒討論出什麼!?
http://blogs.embarcadero.com/abauer/2010/01/14/38904
Friday, November 4, 2011
qemu ram size
在cat /proc/meminfo下 ram總是90多MB
看了一下 qemu的source
原來是在 externel/qemu/android/avd/hardware-properties.ini 設定的
default是 96MB
看了一下 qemu的source
原來是在 externel/qemu/android/avd/hardware-properties.ini 設定的
default是 96MB
Subscribe to:
Posts (Atom)