Another information, allocator is SLOB. If allocator is SLAB or SLUB, the system will hangup when calling chr_dev_init.
I have a problem, If the linux 2.6.22-uc0 is ported to a new CPU or platform, is there any allocator's code to be ported? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Darwin Chen Sent: Saturday, September 15, 2007 10:58 PM To: 'uClinux development list' Subject: RE: [uClinux-dev] Is this a kernel bug? Btw, after the code prompts " Unable to allocate RAM for process text/data, errno -12", show_free_areas() prints the following messages, is it means there are enough free memory to execute /linuxrc. But in fact, /linux can not be executed because of -ENOMEM. Mem-info: DMA per-cpu: CPU 0: Hot: hi: 0, btch: 1 usd: 0 Cold: hi: 0, btch: 1 usd: 0 Active:0 inactive:5 dirty:0 writeback:0 unstable:0 free:3636 slab:0 mapped:0 pagetables:0 bounce:0 DMA free:14544kB min:508kB low:632kB high:760kB active:0kB inactive:20kB present:16256kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 DMA: 2*4kB 1*8kB 0*16kB 2*32kB 0*64kB 1*128kB 0*256kB 2*512kB 1*1024kB 2*2048kB 2*4096kB = 14544kB Free swap: 0kB 4433 pages of RAM 3904 free pages 395 reserved pages 0 slab pages 30 pages shared 0 pages swap cached -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Darwin Chen Sent: Saturday, September 15, 2007 10:29 AM To: 'uClinux development list' Subject: Re: [uClinux-dev] Is this a kernel bug? Dear David, The code failed at mm/nommu.c:1170: if (new_len > kobjsize((void *) addr)) return (unsigned long) -ENOMEM; At this time, new_len = 65536, addr = 0x00750000, kobjsize((void*)addr) returns 4096. So, the code prompts "Unable to allocate RAM for process text/data, errno -12" What's this problem? Thanks. Darwin Chen. -----邮件原件----- 发件人: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] org] 代表 David McCullough 发送时间: 2007年9月13日 7:02 收件人: uClinux development list 主题: Re: [uClinux-dev] Is this a kernel bug? Jivin David Howells lays it down ... > Darwin Chen <[EMAIL PROTECTED]> wrote: > > > I found a surprised code after I hacking the kernel with several weeks: > > In linux-2.6.x/fs/binfmt_flat.c: Line 603: > > textpos = do_mremap(textpos, len, reallen, > > MREMAP_FIXED, textpos); > > > > But, in linux-2.6.x/mm/nommu.c, the code didn't support MREMAP_FIXED flag. > > So, I always get this error. > > > > Is this a kernel bug? Or how to fixed it? > > You need an MMU if you want to implement that - at least for anything other > than new_address == old_address. So just like for MAP_FIXED, MREMAP_FIXED is > not supported if CONFIG_MMU=n. Ok, but both the calls to do_mremap have newaddr and addr the same (ie., textpos above). And from mm/nommu.c: if (flags & MREMAP_FIXED && new_addr != addr) return (unsigned long) -EINVAL; So perhaps it is failing further down the do_mremap conditionals, Cheers, Davidm -- David McCullough, [EMAIL PROTECTED], Ph:+61 734352815 Secure Computing - SnapGear http://www.uCdot.org http://www.cyberguard.com _______________________________________________ uClinux-dev mailing list [email protected] http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by [email protected] To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev _______________________________________________ uClinux-dev mailing list [email protected] http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by [email protected] To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev _______________________________________________ uClinux-dev mailing list [email protected] http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by [email protected] To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev _______________________________________________ uClinux-dev mailing list [email protected] http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by [email protected] To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
