memory and cpu usage

Does anyone know how to determine the memory usage of different processes and how much is available? Also, how can the CPU usage be determined?

GreenHills Multi2000 has a good tool to view the state of the OS. It includes dialogues for all threads, timers, semaphores and so on…

To measure the CPU load I use a very low priority thread and let it run full speed just incrementing an integer. then every 10 seconds I check how high it counted. The higher it counts, the less load on the cpu. To determine the maximum it will count to at 0 load, let it be the only thread and just see how high it goes. Hope this helps

To find out memory-usage I do a loop with allocating memory in blocks of 256 K. When malloc() fails, i approximatly know how much is available. After that don’t forget to free all memory blocks again :wink: