• 5520阅读
  • 0回复

[讨论]运行qt,申请内存太大杀死进程,是不是qt的图片太多了,初始化的时候申请内存太大了,内核杀死进程? [复制链接]

上一主题 下一主题
离线sanmaoljh
 

只看楼主 倒序阅读 楼主  发表于: 2015-07-18
问题1:运行qt,申请内存太大杀死进程,是不是qt的图片太多了,初始化的时候申请内存太大了,内核杀死进程?
如果这样的话,qt该怎么优化少占用内存,qt所有的图片控间在运行的时候全部初始化申请了内存

/bt/light_video_ui  -qws
system common menory size :3936
shmem init ok
init_light_win
init_central_win
init_inform_win
init_curtain_win
(AIR_BTN_MAX==2)
light_video_ui invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0
light_video_ui cpuset=/ mems_allowed=0
[<c002949c>] (unwind_backtrace+0x0/0xd8) from [<c007eaa0>] (T.282+0x88/0x238)
[<c007eaa0>] (T.282+0x88/0x238) from [<c007edbc>] (__out_of_memory+0x16c/0x190)
[<c007edbc>] (__out_of_memory+0x16c/0x190) from [<c007ee60>] (out_of_memory+0x80/0xd0)
[<c007ee60>] (out_of_memory+0x80/0xd0) from [<c0081978>] (__alloc_pages_nodemask+0x464/0x560)
[<c0081978>] (__alloc_pages_nodemask+0x464/0x560) from [<c007c5c8>] (filemap_fault+0x338/0x420)
[<c007c5c8>] (filemap_fault+0x338/0x420) from [<c008f764>] (__do_fault+0x50/0x3f8)
[<c008f764>] (__do_fault+0x50/0x3f8) from [<c0090c4c>] (handle_mm_fault+0x2e4/0x774)
[<c0090c4c>] (handle_mm_fault+0x2e4/0x774) from [<c030c580>] (do_page_fault+0x168/0x254)
[<c030c580>] (do_page_fault+0x168/0x254) from [<c0024244>] (do_PrefetchAbort+0x34/0x94)
[<c0024244>] (do_PrefetchAbort+0x34/0x94) from [<c030aca0>] (ret_from_exception+0x0/0x10)
Exception stack(0xcc27bfb0 to 0xcc27bff8)
bfa0:                                     40d3b4a0 0000018f 40d3b4a0 00000801
bfc0: 00000000 0059d010 0059d010 00091028 00000000 0000cb84 beb8d340 beb8d01c
bfe0: 40971670 beb8cff0 402b46ec 4022cda0 20000010 ffffffff
Mem-info:
Normal per-cpu:
CPU    0: hi:   90, btch:  15 usd:  14
active_anon:40247 inactive_anon:8924 isolated_anon:0
active_file:89 inactive_file:141 isolated_file:0
unevictable:0 dirty:0 writeback:0 unstable:0
free:455 slab_reclaimable:98 slab_unreclaimable:368
mapped:237 shmem:4 pagetables:134 bounce:0
Normal free:1820kB min:1856kB low:2320kB high:2784kB active_anon:160988kB inactive_anon:35696kB active_file:356kB inactive_file:564kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:215392kB mlocked:0kB dirty:0kB writeback:0kB mapped:948kB shmem:16kB slab_reclaimable:392kB slab_unreclaimable:1472kB kernel_stack:264kB pagetables:536kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:1247 all_unreclaimable? yes
lowmem_reserve[]: 0 0
Normal: 9*4kB 9*8kB 17*16kB 11*32kB 5*64kB 0*128kB 1*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB = 1820kB
239 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap  = 0kB
Total swap = 0kB
54272 pages of RAM
511 free pages
1634 reserved pages
334 slab pages
246 pages shared
0 pages swap cached
Out of memory: kill process 690 (light_video_ui) score 4067 or a child
Killed process 690 (light_video_ui)
light_video_ui invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0
light_video_ui cpuset=/ mems_allowed=0
[<c002949c>] (unwind_backtrace+0x0/0xd8) from [<c007eaa0>] (T.282+0x88/0x238)
[<c007eaa0>] (T.282+0x88/0x238) from [<c007edbc>] (__out_of_memory+0x16c/0x190)
[<c007edbc>] (__out_of_memory+0x16c/0x190) from [<c007ee60>] (out_of_memory+0x80/0xd0)
[<c007ee60>] (out_of_memory+0x80/0xd0) from [<c0081978>] (__alloc_pages_nodemask+0x464/0x560)
[<c0081978>] (__alloc_pages_nodemask+0x464/0x560) from [<c007c5c8>] (filemap_fault+0x338/0x420)
[<c007c5c8>] (filemap_fault+0x338/0x420) from [<c008f764>] (__do_fault+0x50/0x3f8)
[<c008f764>] (__do_fault+0x50/0x3f8) from [<c0090c4c>] (handle_mm_fault+0x2e4/0x774)
[<c0090c4c>] (handle_mm_fault+0x2e4/0x774) from [<c030c580>] (do_page_fault+0x168/0x254)
[<c030c580>] (do_page_fault+0x168/0x254) from [<c0024244>] (do_PrefetchAbort+0x34/0x94)
[<c0024244>] (do_PrefetchAbort+0x34/0x94) from [<c030aca0>] (ret_from_exception+0x0/0x10)
Exception stack(0xcc27bfb0 to 0xcc27bff8)
bfa0:                                     40d3b4a0 0000018f 40d3b4a0 00000801
bfc0: 00000000 0059d010 0059d010 00091028 00000000 0000cb84 beb8d340 beb8d01c
bfe0: 40971670 beb8cff0 402b46ec 4022cda0 20000010 ffffffff
Mem-info:
Normal per-cpu:
CPU    0: hi:   90, btch:  15 usd:  14
active_anon:40151 inactive_anon:9020 isolated_anon:0
active_file:89 inactive_file:146 isolated_file:0
unevictable:0 dirty:0 writeback:0 unstable:0
free:455 slab_reclaimable:98 slab_unreclaimable:368
mapped:237 shmem:4 pagetables:134 bounce:0
Normal free:1820kB min:1856kB low:2320kB high:2784kB active_anon:160604kB inactive_anon:36080kB active_file:356kB inactive_file:584kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:215392kB mlocked:0kB dirty:0kB writeback:0kB mapped:948kB shmem:16kB slab_reclaimable:392kB slab_unreclaimable:1472kB kernel_stack:264kB pagetables:536kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:1343 all_unreclaimable? yes
lowmem_reserve[]: 0 0
Normal: 9*4kB 9*8kB 17*16kB 11*32kB 5*64kB 0*128kB 1*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB = 1820kB
239 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap  = 0kB
Total swap = 0kB
54272 pages of RAM
511 free pages
1634 reserved pages
334 slab pages
241 pages shared
0 pages swap cached
Out of memory: kill process 529 (sh) score 2055 or a child
Killed process 689 (light_video_ui)
Killed
快速回复
限100 字节
 
上一个 下一个