c++ - Avoid error reading characters of string. char * -


i on several similar question, couldn't find proper solution situation. trying omp parallel loop. inside 1 of functions in parallel region, trying create m_buffer guess shared (it huge , complicated piece of code, user).

//vector of pointers, each of points start of one-way list of free elements of same size. //the size of elements in each list  determined list's index in vector,  //namely size of element (sizeof(void) * (index + 1)). std::vector<char*> m_buffer; ... bufidx = i_element_size / sizeof(void*) - 1; ... if (m_buffer[bufidx] == nullptr) { ... } else { //comes here! } 

apparently 1 thread tries allocate element inside buffer @ index of 0. attached question see buffer in debug using vs 2013. wondering if there way detect situation beside if condition.

enter image description here


Comments

Popular posts from this blog

c++ - CPP, 'X' button listener -

shared memory - gstreamer shmsrc and shmsink with h264 data -

.net - Bulk insert via Dapper is slower than inserting rows one-by-one -