Ok. I admit defeat. I once said that it would take 1/2 hour to make a memory allocator on RTLinux and was off by a small multiplier: although when I said it, it took me less than 1/2 hour to remember how to compile a module. C++ users seem to have a real need, so here we go. My opinion is that there should be separate buffer pools for each component so that a memory allocation in one component cannot cause failures in another. Anyways: the curious can see two allocators in www.fsmlabs.com/~yodaiken/hacks (does the name give a clue as to whether we will support these yet?). the better allocator is simply an adaption of the nice allocator from Fourmilabs. This is in the bget files. I added a mutex and made it into a module. That took longer than expected, since I got too interested in the type structure. Testing included 0 minutes so use at your own risk. The more interesting, from my point of view, code is rtl_vmalloc which shows how to call an arbitrary Linux function from RTL and includes an improved version of the code using a kernel thread as a server. The example is vmalloc. I've got a much more ambitious version of this in the works, but it's been in the works so long, I decided to release something. Comments and suggestions are welcomed as always. -- --------------------------------------------------------- Victor Yodaiken Finite State Machine Labs: The RTLinux Company. www.fsmlabs.com www.rtlinux.com -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED] -- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
