Displaying 1 result from an estimated 1 matches for "profileevent".
2001 Nov 23
0
eval.c: possible issue with profiling for Windows
I see a possible problem with the "wait" parameter for the profiler
thread:
static void R_InitProfiling(char * filename, int append, double
dinterval)
{
int wait;
Here is the (automatic) variable.
HANDLE Proc = GetCurrentProcess();
..........
wait = interval/1000;
if(!(ProfileEvent = CreateEvent(NULL, FALSE, FALSE, NULL)) ||
(_beginthread(ProfileThread, 0, &wait) == -1))
Here the address of wait is given to the thread
R_Suicide("unable to create profiling thread");
R_Profiling = 1;
Here you leave your function, invalidating "wait" by fre...