LockPool and LockQueue Memory Tester (for PropTerm)
mcstar
Posts: 144
I struggled with getting the LockQueue and LockPool to work together for some time and ended up writing this test program which made it easier to test the configuration of the two objects.· The concept is to use the LockQueue to store the pointers created by allocations to the LockPool.· This effectively gives you a way to track any number of memory allocations provided you've created enough space for the queue, the pool and the hole table.· This demo sets up the objects and runs a memory viewer on the main cog, then it starts another cog that allocates memory until either the Queue or the Pool fills up (or the program runs out of stack space). If the Queue or Pool fills up, then the first cog stops itself and the main cog starts another cog that pops the queue and frees the pool until there are no more allocations (ie all the objects have been removed).· You can play with the size of the displayRAM, vcStack, and drQueTable as well as the dSize (data allocation size) to see the results of changing these values for your required configuration.· If the program succesfully fills up the entire pool and then empties it out, chances are you have a good configuration that doesn't run out of Stack, or Queue space.· If the queue gets full before your Pool is used up, you need to allocate a larger Queue or change your allocation size etc.· Now on to actually using these powerful tools!
(btw, Thank you to Chad George for writing these great objects!)
Post Edited (mcstar) : 9/19/2007 12:50:58 AM GMT
(btw, Thank you to Chad George for writing these great objects!)
Post Edited (mcstar) : 9/19/2007 12:50:58 AM GMT
Comments
Pinouts....
LCD
EN -· P5
RS -· P4
[noparse][[/noparse]D4 - D7] - [noparse][[/noparse]P3-P0]
IR
input - P12
I'm glad you worked on testing everything out. That was definitely one area that I hadn't finished yet.
And you got LockPool and LockQueue to play nicely together. I intended them too, but had only used/tested them
seperately so far.
-Chad