Last edit: Peter Favrholdt on December 10, 2006 23:08 (3761 days, 3 hours and 13 minutes ago) (diff)
Rtai.Dk | RecentChanges | Preferences | DIAPM RTAI

Q: I was wondering if there are any other memory allocators out there written for RTAI, other then that rt_mem_mgr that comes with it?

A: "Yet Another memory allocator", search the archives of the mailinglist.

Q: Is there any limit to the amount of memory that I can allocate with rtai_malloc? I can allocate up to around 300kB then the next block I try to allocate rtai_malloc returns NULL !

I'm using 2.4.22 + rtai-24.1.12

My system has 250MB RAM, lots of space at the time I am trying to do the rtai_malloc.

A: If I read this code correctly, about 256kb are allocated when rt_mem_mgr starts, in order to create its initial heap. If you try to get chunks > 128kb once this initial memory has been consumed, you may want to enable the VMALLOC support for rt_mem_mgr when configuring RTAI. If you actually asked for smaller chunks to no avail, well, there might be something else to fix...

Blast, sorry, I'm toast. I always get confused between rt_malloc() and rtai_malloc(). The latter belongs to rtai_shm, so you can forget about my previous mail. Someone had the same problem sometimes ago, maybe an answer is hiding somewhere in the archive?


A2: I have just found my problem it turns out this I was using 35 slots and needed to change the slots #define - currently only 32, an error mesg to that effect would have been nice tho !

Edit text of this page | View other revisions | Download Rtai.dk