9월, 2017의 게시물 표시

i++ vs ++i in C and C++

Prefer ++i over i++. In C language, there is no difference between ++i and i++. In C++, ++i has performance gain rather than i++ because of object copy. In detail, refer followings https://stackoverflow.com/questions/24853/what-is-the-difference-between-i-and-i https://stackoverflow.com/questions/24886/is-there-a-performance-difference-between-i-and-i-in-c

Android essentials summary

- Binder Binder is android-specific inter-process communication mechanism and RPC mechanism. Android does not use traditional system V IPC and does use binder, which is efficient and fast. In order to provide efficient IPC, binder driver was added in linux kernel. And for app, AIDL was provided and app developers can develop binder client and server easily without coding the marshalling/unmarshalling stuffs. - ASHMEM Asynchronous shared memory was added to android linux kernel. Compared to system V shared memory, ashmem releases kernel resources when nobody refers the shared memory and kernel can reclaim unpinned shared memory when memory runs low. When app shares large amount of data to other app or service such as surface data and image, passing data by using shared memory does not need to copy data and therefore shared memory outperforms other methods like socket. - AIDL AIDL(Android Interface Definition Language) is a kind of IDL specific to android. AIDL defines programmin...