Gus, was kind enough to point me to a pre-canned heap implementation right in the Microsoft Porting kit. Pulled it over and wrote up a quick application to test the dynamic memory allocation, I have not tested extensively, but so far it has worked like a charm and it only took about ten minutes to get it into my project and working.
Here is a video of the test program, it is not optimized for performance but it tests the memory allocation.
Yes, this is on the Hydra, I must tell you that I am really enjoying the Hydra it is an excellent piece of kit. I can’t wait for the Gadgeteer format for the G120, with all the premium goodness.
I have read that GCC is less than stellar on the ARM processors. The other options are a tad pricey especially since this is little more than a hobby for me. In all fairness, the code can still be significantly optimized so I cannot blame the complier just yet, it was really just a quick and dirty so I could test the memory manager.
The glow around the pixels is just a side effect of my cheapo web cam that I use to record the video. When the spheres move within range to appear to influence each other the algorithm has a natural anti-aliasing.
Starting with 1 circle which naturally has a X, Y and Radius, then every pixel is assigned a weight based on the distance from the surface of the circle when the maximum weight is for pixels falling exactly on the surface. If the weight is between 0.9 and 1.0 then draw the pixel. Running this with one circle will give you a circle on the screen that will have that ‘fuzzy’ look.
When there are two or more circles, the same process is carried out but the weight at the pixel is the sum of all circles influencing the pixel and if that weight is in the 0.9-1.0 range then draw the pixel, it is this sum of influence that causes pixels between neighboring circles to light-up.
I will post the code on code share, which should make it clearer.