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.
Comments
Post a Comment