Displaying 1 result from an estimated 1 matches for "profilethread".
Did you mean:
  profile_head
  
2001 Nov 23
0
eval.c: possible issue with profiling for Windows
...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 freeing its memory.
}
Depending on the compiler (and/or hardware!) used, this ca...