revert tests

master
Christien Rioux 9 years ago
parent 0d527771eb
commit a9525d4682

@ -229,13 +229,10 @@ unsigned int CLineCount::countThread(int thread_number)
tlc_linecount_t count = 0;
void *mem = NULL;
void *mapmem = MMAP(NULL, m_filesize, PROT_READ, MAP_FILE | MAP_SHARED, m_fh, 0);
madvise(mapmem, m_filesize, MADV_SEQUENTIAL);
while (curoffset < m_filesize)
{
if (m_thread_fail)
{
return -1;
}
@ -244,6 +241,7 @@ madvise(mapmem, m_filesize, MADV_SEQUENTIAL);
// Map view of file
#ifdef _WIN32
if (mem)
{
if (!UnmapViewOfFile(mem))
@ -255,7 +253,7 @@ madvise(mapmem, m_filesize, MADV_SEQUENTIAL);
}
mem = MapViewOfFile(m_filemapping, FILE_MAP_READ, (DWORD)(curoffset >> 32), (DWORD)curoffset, (SIZE_T)mapsize);
#else
/* if (mem)
if (mem)
{
if(munmap(mem, lastmapsize) !=0)
{
@ -265,7 +263,6 @@ madvise(mapmem, m_filesize, MADV_SEQUENTIAL);
}
}
mem = MMAP(NULL, mapsize, PROT_READ, MAP_FILE | MAP_SHARED, m_fh, curoffset); */
mem = ((char *)mapmem) + curoffset;
// printf("%p %lld %lld\n",mem, mapsize, curoffset);
#endif
if (mem == MAP_FAILED)

Loading…
Cancel
Save