Home › Forums › C Programming › C++ error when using threads
- This topic has 0 replies, 1 voice, and was last updated 15 years, 6 months ago by AlG27wowyt.
Viewing 0 reply threads
- AuthorPosts
- May 18, 2009 at 9:51 pm #2198AlG27wowytParticipant
I’m using the windows.h file to use pthreads and I keep getting this error:
123Illegal System DLL Relocation<br /><br />The system DLL user32.dll was relocated in memory. The application will not run properly. The relocation occurred because the DLL Dynamically Allocated Memory occupied an address range reserved for Windows system DLLs. The vendor supplying the DLL should be contacted for a new DLL.—
123Application Error<br /><br />The instruction at "0x611885849" referenced memory at "0x0524efe4". The memory could not be "read".My problem is that I’m creating a program that will organize “words” using merge sort and it creates a thread for every left side of the sort
12345678910111213141516void merge_sort( void *ind )<br />{<br />pthread_t thread;<br />int arrM[2] = {((int*)ind)[0], ((int*)ind)[1]};<br />int low = arrM[0], high = arrM[1], iret, mid;<br />int arr1[2] = {low, 0}, arr2[2] = {0, high};<br />if(low < high) {<br />mid = (low + high) / 2;<br />arr1[1] = mid;<br />arr2[0] = mid + 1;<br />iret = pthread_create(&thread, NULL, (void*(*)(void*))merge_sort, (void*) arr1);<br />merge_sort((void*) arr2);<br />pthread_join(thread, NULL);<br />merge(low, mid, high);<br />}<br />}I was told that the problem is with the indexing or the memory, but I don’t really understand the problem. Could anyone guide me in the right direction?
- AuthorPosts
Viewing 0 reply threads
- The forum ‘C Programming’ is closed to new topics and replies.