[docs] [issue12957] mmap.resize changes memory address of mmap'd region

Michael Schurter report at bugs.python.org
Sat Sep 10 22:24:19 CEST 2011

New submission from Michael Schurter <m at schmichael.com>:

Since mmap.resize uses MREMAP_MAYMOVE on Linux, it would be nice to warn users that pointers into their memory mapped regions will be invalid after resizes. Linux's manpage offers the following explanation:

"If the mapping is relocated, then absolute pointers into the old mapping location become invalid (offsets relative to the starting address of the mapping should be employed)."

Since the only way I know of to use pointers into mmaps from pure Python is to use ctypes.<type>.from_buffer(<mmap>), perhaps clarification would be better in the ctypes docs.

assignee: docs at python
components: Documentation
files: killctypes.py
messages: 143845
nosy: docs at python, schmichael
priority: normal
severity: normal
status: open
title: mmap.resize changes memory address of mmap'd region
type: feature request
versions: Python 2.7
Added file: http://bugs.python.org/file23126/killctypes.py

Python tracker <report at bugs.python.org>

More information about the docs mailing list