[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] malloc
Hi Yuan,
Yuan Song wrote:
Does anybody know why I can not allocate more than 4M of data. The malloc
will return fail.
The noMMU malloc() implementation just calls straight through to
kmalloc(), the kernel's allocator. It, in turn, is limited in the size
of blocks it can give out.
If you are doing malloc() calls with requests larger than a couple of
mbyte, I'd be taking a closer look at your app and system design, see if
there's not a cleaner way to go. Provide some more details and we might
have some recommendations.
If you want to do it the evil way, use the C_MAIN_MEMORY_SIZE override
in the MSS file to limit the kernel's memory extent, and hardcode a
pointer somewhere up to the top of memory for your app to use. But, you
didn't hear it from me!
Regards,
John
___________________________
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/