Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OutOfMemoryError #5

Open
iofisher opened this issue May 5, 2017 · 3 comments
Open

OutOfMemoryError #5

iofisher opened this issue May 5, 2017 · 3 comments

Comments

@iofisher
Copy link

iofisher commented May 5, 2017

05-01 09:09:06.065 30849-30877/com.chuanmo.indoorsample E/lock: 16
05-01 09:09:06.075 30849-30875/com.chuanmo.indoorsample I/art: Alloc concurrent mark sweep GC freed 11(12KB) AllocSpace objects, 0(0B) LOS objects, 10% free, 142MB/158MB, paused 368us total 13.032ms
05-01 09:09:06.075 30849-30875/com.chuanmo.indoorsample I/art: Forcing collection of SoftReferences for 115MB allocation
05-01 09:09:06.075 30849-30877/com.chuanmo.indoorsample E/lock: 16
05-01 09:09:06.085 30849-30875/com.chuanmo.indoorsample I/art: Alloc concurrent mark sweep GC freed 14(456B) AllocSpace objects, 0(0B) LOS objects, 10% free, 142MB/158MB, paused 322us total 11.242ms
05-01 09:09:06.085 30849-30875/com.chuanmo.indoorsample E/art: Throwing OutOfMemoryError "Failed to allocate a 121148812 byte allocation with 16777216 free bytes and 113MB until OOM"
05-01 09:09:06.085 30849-30875/com.chuanmo.indoorsample E/AndroidRuntime: FATAL EXCEPTION: Thread-35367
Process: com.chuanmo.indoorsample, PID: 30849
java.lang.OutOfMemoryError: Failed to allocate a 121148812 byte allocation with 16777216 free bytes and 113MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:939)
at android.graphics.Bitmap.createBitmap(Bitmap.java:912)
at android.graphics.Bitmap.createBitmap(Bitmap.java:879)
at com.karonl.instance.Adapter.BitAdapter.drawBitmap(BitAdapter.java:42)
at com.karonl.instance.Adapter.DataAdapter.refreshData(DataAdapter.java:46)
at com.chuanmo.indoorsample.MainActivity$1.run(MainActivity.java:84)
at java.lang.Thread.run(Thread.java:818)
05-01 09:09:06.095 30849-30877/com.chuanmo.indoorsample E/lock: 16
05-01 09:09:06.115 30849-30877/com.chuanmo.indoorsample E/lock: 16
05-01 09:09:06.125 30849-30877/com.chuanmo.indoorsample E/lock: 9
05-01 09:09:06.145 30849-30877/com.chuanmo.indoorsample E/lock: 15

@karonl
Copy link
Owner

karonl commented May 5, 2017

手机的内存总量是?图片的大小是?测试小图片是否出现问题,方便定位

@iofisher
Copy link
Author

iofisher commented May 5, 2017

运行的demo工程

MemTotal: 2845020 kB
MemFree: 237396 kB
Buffers: 50872 kB
Cached: 574000 kB
SwapCached: 120168 kB
Active: 776796 kB
Inactive: 917268 kB
Active(anon): 464920 kB
Inactive(anon): 611580 kB
Active(file): 311876 kB
Inactive(file): 305688 kB
Unevictable: 4288 kB
Mlocked: 0 kB
HighTotal: 2216956 kB
HighFree: 170192 kB
LowTotal: 628064 kB
LowFree: 67204 kB
SwapTotal: 1310716 kB
SwapFree: 776356 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 1025164 kB
Mapped: 363056 kB
Shmem: 3020 kB
Slab: 91876 kB
SReclaimable: 34320 kB
SUnreclaim: 57556 kB
KernelStack: 16936 kB
PageTables: 66056 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 2733224 kB
Committed_AS: 125608840 kB
VmallocTotal: 348160 kB
VmallocUsed: 8348 kB
VmallocChunk: 80544 kB

@karonl
Copy link
Owner

karonl commented May 8, 2017

正在修改加载图片方式,以适应app被分配最低16M虚拟机内存的情况

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants