天嵌 ARM开发社区

 找回密码
 注册
查看: 2300|回复: 7

cam2jpg拍照问题

[复制链接]
陆文潮 发表于 2013-3-29 11:11:27 | 显示全部楼层 |阅读模式
执行的时候出错,错误信息如下:
Start Main
takephoto: page allocation failure. order:10, mode:0xd1
Backtrace:
[<c0027fd4>] (dump_backtrace+0x0/0x10c) from [<c033a6fc>] (dump_stack+)
r7:0000000a r6:00000155 r5:c38e7b00 r4:00000000
[<c033a6e4>] (dump_stack+0x0/0x1c) from [<c0065924>] (__alloc_pages_in)
[<c00655e8>] (__alloc_pages_internal+0x0/0x41c) from [<c0065a78>] (__g)
[<c0065a50>] (__get_free_pages+0x0/0x54) from [<bf06e780>] (camif_open)
[<bf06e648>] (camif_open+0x0/0x26c [ov9650]) from [<c014fb14>] (misc_o)
[<c014f9ec>] (misc_open+0x0/0x200) from [<c0087580>] (chrdev_open+0xcc)
r9:00000002 r8:c347b580 r7:c308dd00 r6:c3b3a4b0 r5:c3834300
r4:00000000
[<c00874b4>] (chrdev_open+0x0/0x170) from [<c0082a7c>] (__dentry_open+)
r7:c00874b4 r6:c3b3a4b0 r5:c308dd00 r4:00000000
[<c00829ac>] (__dentry_open+0x0/0x270) from [<c0082d14>] (nameidata_to)
[<c0082cb0>] (nameidata_to_filp+0x0/0x6c) from [<c008fc80>] (do_filp_o)
r5:00000000 r4:00000000
[<c008fa90>] (do_filp_open+0x0/0x7e8) from [<c00828d8>] (do_sys_open+0)
[<c0082868>] (do_sys_open+0x0/0xe8) from [<c0082988>] (sys_open+0x24/0)
r8:c0024008 r7:00000005 r6:00008ba0 r5:00000000 r4:00013058
[<c0082964>] (sys_open+0x0/0x28) from [<c0023e60>] (ret_fast_syscall+0)
Mem-info:
Normal per-cpu:
CPU    0: hi:   18, btch:   3 usd:   0
Active_anon:819 active_file:103 inactive_anon:1100
inactive_file:1322 dirty:0 writeback:0 unstable:0
free:7053 slab:564 mapped:254 pagetables:94 bounce:0
Normal free:28212kB min:1016kB low:1268kB high:1524kB active_anon:3276o
lowmem_reserve[]: 0 0
Normal: 309*4kB 204*8kB 110*16kB 91*32kB 101*64kB 35*128kB 4*256kB 1*5B
1449 total pagecache pages
16384 pages of RAM
10235 free pages
1432 reserved pages
378 slab pages
1149 pages shared
0 pages swap cached
/dev/camera: Cannot allocate memory
TQ-ZQL 发表于 2013-3-29 11:23:40 | 显示全部楼层
驱动申请不到内存,试下将不要的程序都关了,将分辨率设置 小一点。320×240
 楼主| 陆文潮 发表于 2013-3-29 11:37:59 | 显示全部楼层
我查过了,内存free部分(未使用)还剩28000k左右,怎么会申请不到呢?
TQ-lkp 发表于 2013-3-29 18:11:54 | 显示全部楼层
使用top命令可以看剩余内存大小
 楼主| 陆文潮 发表于 2013-4-1 10:58:31 | 显示全部楼层
Mem: 29716K used, 30364K free, 0K shrd, 0K buff, 14092K cached
CPU: 47.6% usr 49.7% sys  0.0% nic  0.0% idle  0.0% io  0.5% irq  2.0% sirq
Load average: 1.96 1.21 0.54 3/61 863
  PID  PPID USER     STAT   VSZ %MEM CPU %CPU COMMAND
  761   760 root     R     1512  2.5   0 70.6 ./lib/final_speech_recognizer
  855   854 root     S    13656 22.6   0 25.2 mplayer -ao alsa http://www.irewo.
  863   860 root     R     2100  3.4   0  1.5 top
  661     2 root     SW       0  0.0   0  0.9 [RTKTHREAD]
  859   629 root     S     2100  3.4   0  0.3 /usr/sbin/telnetd -i
  703   698 root     S     107m183.2   0  0.0 python app_platform_mp.py
  824   703 root     S    93976156.0   0  0.0 python app_platform_mp.py
  858   855 root     S    13120 21.7   0  0.0 mplayer -ao alsa http://www.irewo.
  629     1 root     S     4756  7.9   0  0.0 /usr/sbin/inetd
  769     1 root     T     4516  7.5   0  0.0 pocketsphinx_continuous -lm /rewo6
  693     1 root     S     4100  6.8   0  0.0 dhclient wlan0
  664     1 root     S     2824  4.6   0  0.0 wpa_supplicant -iwlan0 -c /etc/wpa
  860   859 root     S     2100  3.4   0  0.0 -sh
  698     1 root     S     2100  3.4   0  0.0 -/bin/sh
    1     0 root     S     2096  3.4   0  0.0 init
  760   703 root     S     2096  3.4   0  0.0 /bin/sh -c ./lib/final_speech_reco
  854   824 root     S     2096  3.4   0  0.0 sh -c mplayer -ao alsa http://www.
  638     1 root     S     2064  3.4   0  0.0 /sbin/boa
  738     1 root     S     1524  2.5   0  0.0 /usr/bin/rfidon-daemon -pidfile /v
  814     1 root     S     1524  2.5   0  0.0 /usr/bin/ledon-daemon -pidfile /v
亚瑟王 发表于 2013-4-1 13:42:49 | 显示全部楼层
陆文潮 发表于 2013-4-1 10:58
Mem: 29716K used, 30364K free, 0K shrd, 0K buff, 14092K cached
CPU: 47.6% usr 49.7% sys  0.0% nic   ...

你用的摄像头是什么?
 楼主| 陆文潮 发表于 2013-4-2 11:28:04 | 显示全部楼层
就是ov9650的
 楼主| 陆文潮 发表于 2013-4-2 17:18:45 | 显示全部楼层
我一步一步跟踪了,应用层调用到open函数之后,到了底层那边,在调用__get_free_pages这个函数出错!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2024-6-29 03:32 , Processed in 1.093750 second(s), 18 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表