- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
on my board I've more than 8000 KB of free RAM. From my application I try to malloc a big buffer in RAM, ~5000KB, but I see that the malloc function don't give me this memory space. I made some test and I've seen that the maximal block of memory that I can to alloc is ~4194055 Bytes. Why? Is there an allocation limit? Can somebody help me? thanks StePaLink Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no MMU support here.
Even you have a lot free memory, they may be fragmented. You should allocate in smaller chunks, and make a list of them.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks hippo,
I've tried to malloc in smaller blocks. It's work better, but I see that if the malloc failed, after some tries the kernel kill my application. How do I have to set the overcommit_memory and overcommit_ratio in /proc/sys/vm ? Which other kernel parameter have I to set, so that my system works properly, and to avoid that my applications are killed from the OOM_KILLER? Can somebody help me? thanks StePa- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by stepa@Dec 6 2005, 02:31 AM thanks hippo,
i've tried to malloc in smaller blocks. it's work better, but i see that if the malloc failed, after some tries the kernel kill my application.
how do i have to set the overcommit_memory and overcommit_ratio in
/proc/sys/vm ?
which other kernel parameter have i to set, so that my system works properly, and to avoid that my applications are killed from the oom_killer?
can somebody help me?
thanks
stepa
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=11342)
--- quote end ---
--- Quote End --- not sure if this is related, but there is a parameter in the kernel configure menu that allows the allocation of 'large' blocks of memory - make sure that is on.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page