3 ms·
Most Android apps probably allocate more with the JVM than they do malloc, right? My intuitive guess is that they could regress the performance of libc malloc a
by asveikau 6y ago
Most Android apps probably allocate more with the JVM than they do malloc, right? My intuitive guess is that they could regress the performance of libc malloc and many people wouldn't notice.
- pjmlp 6y agoYes, the NDK main goal is for writing native libraries, not full blown applications. Although native memory allocations can happen via ByteBuffer, HardwareBuffer, image decoders, or native libraries.
- stephc_int13 6y agoMany games are written in C/C++ with the minimal amount of Java.
- asveikau 6y agoGames are usually written to allocate memory upfront and keep the per-frame allocation cost from affecting performance, by re-using buffers. So I would expect a well written game to also not be a workload in which you can recognize a poor performing malloc. Same with media code for similar reasons.