________________________________

Hi all, 

            I have some problem in uClinux, please help me!!!!

            I run uClinux on SH7263 processor. I have information about
memory:

            

root:/proc> cat meminfo

MemTotal:        14896 kB

MemFree:         10400 kB

Buffers:           672 kB

Cached:            336 kB

SwapCached:          0 kB

Active:            800 kB

Inactive:          208 kB

HighTotal:           0 kB

HighFree:            0 kB

LowTotal:        14896 kB

LowFree:         10400 kB

SwapTotal:           0 kB

SwapFree:            0 kB

Dirty:               0 kB

Writeback:           0 kB

Mapped:              0 kB

Slab:             3328 kB

CommitLimit:      7448 kB

Committed_AS:        0 kB

PageTables:          0 kB

VmallocTotal:        0 kB

VmallocUsed:         0 kB

VmallocChunk:        0 kB

 

I think free memory is 10400kb= 10.15M. But when I use simple code to
test:

 

            While((mem=calloc(1,1024*1024))==NULL)

            {

                        i++;

                        printf("Number of calloc %d\n",i);

}

            

The result:

                        root:/mnt> root:/mnt> ./test1

size of mem=1

size of mem=2

size of mem=3 

size of mem=4

oom-killer: gfp_mask=0x40d0, order=9

 

Call trace: 

[<0c024bde>] out_of_memory+0x2e/0x154

[<0c0c08a8>] cond_resched+0x0/0x94

[<0c025c3c>] __alloc_pages+0x1d0/0x29c

[<0c025c4c>] __alloc_pages+0x1e0/0x29c

[<0c0c08a8>] cond_resched+0x0/0x94

[<0c02cbf4>] cache_alloc_refill+0x238/0x428

[<0c02cf2a>] __kmalloc+0x5a/0x80

[<0c02b722>] do_mmap_pgoff+0x4a8/0x7b2

[<0c08725c>] write_chan+0x0/0x2fc

[<0c02fb56>] vfs_write+0x6e/0xe0

[<0c004ecc>] old_mmap+0x6c/0xc0

[<0c00647c>] syscall_call+0xe/0x10

[<0c004e60>] old_mmap+0x0/0xc0

 

Mem-info:

DMA per-cpu: empty

DMA32 per-cpu: empty

Normal per-cpu:

cpu 0 hot: high 0, batch 1 used:0

cpu 0 cold: high 0, batch 1 used:0

HighMem per-cpu: empty

Free pages:        3040kB (0kB HighMem)

Active:92 inactive:76 dirty:0 writeback:0 unstable:0 free:760 slab:2757
mapped:0

 pagetables:0

DMA free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB
present:0kB pages_

scanned:0 all_unreclaimable? no

lowmem_reserve[]: 0 0 16 16

DMA32 free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB
present:0kB page

s_scanned:0 all_unreclaimable? no

lowmem_reserve[]: 0 0 16 16

Normal free:3040kB min:512kB low:2176kB high:2304kB active:368kB
inactive:304kB 

present:16384kB pages_scanned:805 all_unreclaimable? yes

lowmem_reserve[]: 0 0 0 0

HighMem free:0kB min:128kB low:512kB high:512kB active:0kB inactive:0kB
present:

0kB pages_scanned:0 all_unreclaimable? no

lowmem_reserve[]: 0 0 0 0

DMA: empty

DMA32: empty

Normal: 6*4kB 13*8kB 6*16kB 4*32kB 4*64kB 1*128kB 1*256kB 0*512kB
0*1024kB 1*204

8kB 0*4096kB = 3040kB

HighMem: empty

Free swap:            0kB

4096 pages of RAM

372 reserved pages

6 pages shared

0 pages swap cached

Out of Memory: Kill process 47 (test1) score 64 and children.

Out of memory: Killed process 47 (test1).

Killed

 

I don't know, I just allocate mem*1024*1024= 4*1024*1024=4MB. Why does
it appear error "Out of Memory"  ???

Please help me!

 

An Ho

Best.

 

            

 

 

 

 

 

 

 

 

 

 

 

 

 

_______________________________________________
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

Reply via email to