Hero
June 27th, 2007, 01:59
Hi all
In my small program,I forced to write several threads(5 of them) and heavily process some data and APIs in it.
One of these important APIs is "GlobalAlloc" and "GlobalFree",it means that I forced to allocated some memory at start of a loop in my thread using GlobalAlloc(with GPTR flag) and free it using GlobalFree at the and of loop,and this happens for all threads.
Here is my question:
Is there any guarantee that my allocated memory in a thread has no overlapping with allocated memory in other threads?
Regards
In my small program,I forced to write several threads(5 of them) and heavily process some data and APIs in it.
One of these important APIs is "GlobalAlloc" and "GlobalFree",it means that I forced to allocated some memory at start of a loop in my thread using GlobalAlloc(with GPTR flag) and free it using GlobalFree at the and of loop,and this happens for all threads.
Here is my question:
Is there any guarantee that my allocated memory in a thread has no overlapping with allocated memory in other threads?
Regards