[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] memory allocation failure when execute 5MB application on microblaze uclinux on Spartan3E revD starter kit with petalinux 0.3



Hi,
we've experienced similar problems with some of our bigger applications. Try increasing the value of MAX_ORDER in the memory allocation code. We hope to find a better, official solution when there's time, but this lets us get on with the over-sized binaries for now. Our board has 64MB of RAM and we increased MAX_ORDER to 13, this should allow allocation of up to 32MB.

In "...include/linux/mmzone.h", you'll find the following just after the #includes, about line 19:

...
/* Free memory management - zoned buddy allocator.  */
#ifndef CONFIG_FORCE_MAX_ZONEORDER
#define MAX_ORDER 11
#else
#define MAX_ORDER CONFIG_FORCE_MAX_ZONEORDER
#endif
#define MAX_ORDER_NR_PAGES (1 << (MAX_ORDER - 1))
...

We replaced this with:
...

/* Free memory management - zoned buddy allocator. */
#define MAX_ORDER 13 /* CHANGE */
#define MAX_ORDER_NR_PAGES (1 << (MAX_ORDER - 1))
...


-----Original Message-----
From: zhangxinmin <giantbull@xxxxxxxxxxx>
To: microblaze-uclinux@xxxxxxxxxxxxxx
Sent: Fri, 6 Feb 2009 3:17
Subject: [microblaze-uclinux] memory allocation failure when execute 5MB application on microblaze uclinux on Spartan3E revD starter kit with petalinux 0.3











subscribe microblaze-uclinux

Allocation of length 4758088 from process 57 failed
DMA per-cpu:
CPU    0: Hot: hi:   18, btch:   3 usd:   5   Cold:
hi: 6, btch: 1 usd: 0 Active:1189 inactive:552 dirty:0 writeback:0 unstable:0 free:12540 slab:658 mapped:0 pagetables:0 DMA free:50160kB min:1016kB low:1268kB high:1524kB active:4756kB inactive:2208kB present:65024kB pages_scanned:0 all_unreclaimable?
no
lowmem_reserve[]: 0 0
DMA: 0*4kB 0*8kB 1*16kB 1*32kB 1*64kB 1*128kB 1*256kB 1*512kB 0*1024kB 0*2048kB 12*4096kB = 50160kB
Unable to allocate RAM for process text/data, errno 12
Trace/BPT trap

any body know the reason of this issue?
thanks"

i got some information, "4MB is the largest block in system, uclinux can not allocate large memory
block bigger than the max memory block, "
but if i want to allocate a 5MB
memory for a dynamic array, will it be failure?
but in many system, there has such requirment for big dynamic memory.
following is the meminfo of my system.
cat meminfo

MemTotal: 55428 kB

MemFree: 49864 kB

Buffers: 1028 kB

Cached: 1052 kB

SwapCached: 0 kB

Active: 784 kB

Inactive: 1284 kB

SwapTotal: 0 kB

SwapFree: 0 kB

Dirty: 0 kB

Writeback: 0 kB

AnonPages: 0 kB

Mapped: 0 kB

Slab: 3188 kB

SReclaimable: 372 kB

SUnreclaim: 2816 kB

PageTables: 0 kB

NFS_Unstable: 0 kB

Bounce: 0 kB

CommitLimit: 27712 kB

Committed_AS: 0 kB

VmallocTotal: 0 kB

VmallocUsed: 0 kB

VmallocChunk: 0 kB
#

now i desize the application to204MB, it can run, but whether there have ways to run bigger app on uclinux, or whether uclinux can allocate big larger dynamic memory block (12M example) for application




立刻下载 MSN 保护盾,保障 MSN 安全稳定! 现在就下载!







________________________________________________________________________
AOL Email goes Mobile! You can now read your AOL Emails whilst on the move. Sign up for a free AOL Email account with unlimited storage today.

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/