Add-Ons & Services

A problem about multi-thread-heap-memory-management

Please post support and help requests here.

A problem about multi-thread-heap-memory-management

Postby roofalison » 22 Sep 2008, 10:09

These days I write a class to solve the memory management.
The father thread maintains a big heap, every child thread have to ask for memory to this global class object:
But I have a problem, if a thread is crashed(Yes, not stop, it is crash!) The class can collect the heap storage automatically. But how could I know if the thread is still running or crashed?
I maintain a map:
map ThreadMap;
Ha, but i does not work well. Since the Thread object I point to was destroy, and another thread start, it will not tell me the truth.
Even when it stops, it still tell me that (true == pThread->isRunning() ).
How to solve this?
Posts: 1
Joined: 17 Sep 2008, 15:14

Return to Support

Who is online

Users browsing this forum: beetie and 5 guests