New submission from Ralf Schmitt <[EMAIL PROTECTED]>:

on unix it does call msync however.


here is the relevant part from mmapmodule.c:

static void
mmap_object_dealloc(mmap_object *m_obj)
{
#ifdef MS_WINDOWS
        if (m_obj->data != NULL)
                UnmapViewOfFile (m_obj->data);
        if (m_obj->map_handle != INVALID_HANDLE_VALUE)
                CloseHandle (m_obj->map_handle);
        if (m_obj->file_handle != INVALID_HANDLE_VALUE)
                CloseHandle (m_obj->file_handle);
        if (m_obj->tagname)
                PyMem_Free(m_obj->tagname);
#endif /* MS_WINDOWS */

#ifdef UNIX
        if (m_obj->fd >= 0)
                (void) close(m_obj->fd);
        if (m_obj->data!=NULL) {
                msync(m_obj->data, m_obj->size, MS_SYNC);
                munmap(m_obj->data, m_obj->size);
        }
#endif /* UNIX */

        Py_TYPE(m_obj)->tp_free((PyObject*)m_obj);
}

----------
messages: 65552
nosy: schmir
severity: normal
status: open
title: mmap_object_dealloc does not call FlushViewOfFile on windows

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2643>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to