Hi Phil,
Thanks for the input. That was my initial thought, but
CONFIG_LARGE_ALLOCS is not an option in the kernel anymore.
Also, the #DEFINEs that the CONFIG_LARGE_ALLOCS flag controlled
aren't in slab.c.
After looking at this a bit more I believe the maximum
executable is defined in kmalloc_sizes.h:
...
#if KMALLOC_MAX_SIZE >= 4194304
CACHE(4194304)
#endif
KMALLOC_MAX_SIZE is defined in slab.h
...
#define KMALLOC_SHIFT_HIGH ((MAX_ORDER + PAGE_SHIFT - 1) <= 25 ? \
(MAX_ORDER + PAGE_SHIFT - 1) : 25)
#define KMALLOC_MAX_SIZE (1UL << KMALLOC_SHIFT_HIGH)
and MAX_ORDER and PAGE_SHIFT are defined as:
MAX_ORDER = 11
PAGE_SHIFT = 12
Which leaves the maximum executable as: (1UL << 22) or 4194304.
So if I need to allow a bigger executable does anybody have
suggestions on the pitfalls I might encounter increasing
MAX_ORDER or PAGE_SHIFT?
Thanks,
Matt
Phil Wilshire wrote:
Hi Matt,
Dose setting
CONFIG_LARGE_ALLOCS
in the kernel config
help
Phil Wilshire
Matt Waddel wrote:
Hi all,
It's been a while since I've seen this topic discussed, it
seems like it stopped being an issue several years ago.
Basically the problem is I have a large executable and the
following error is displayed when I try to run it:
---
Allocation of length 7640068 from process 244 failed
Normal per-cpu:
CPU 0: Hot: hi: 0, btch: 1 usd: 0 Cold: hi: 0, btch: 1
usd: 0
Active:302 inactive:803 dirty:0 writeback:0 unstable:0
free:4012 slab:1334 mapped:0 pagetables:0 bounce:0
Normal free:16048kB min:720kB low:900kB high:1080kB active:1208kB
inactive:3212k
B present:32512kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0
Normal: 256*4kB 402*8kB 228*16kB 95*32kB 30*64kB 5*128kB 2*256kB 2*512kB
1*1024k
B 0*2048kB 0*4096kB = 16048kB
Unable to allocate RAM for process text/data, errno 12
---
So the largest memory chunk is 1M and the executable is
7.5M. Is there a kernel config option that will allow
bigger allocations to be defined? Can I manually change
something in the kernel to not have so many small sections,
but one large allocation for a 7.5M executable?
TIA,
Matt
_______________________________________________
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