Skip to content

Commit 6c13efc

Browse files
committed
Update Docs
1 parent 5919851 commit 6c13efc

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Doc/library/mmap.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,16 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
328328

329329
.. versionadded:: 3.13
330330

331+
.. method:: set_name(name)
332+
333+
Annotate the memory map with the given *name* for easier identification
334+
in ``/proc/<pid>/maps`` if the kernel supports the feature and :option:`-X dev <-X>` is passed
335+
to the Python or Python is built in :ref:`debug mode <debug-build>`
336+
337+
Availability: Linux kernel 5.17 or newer.
338+
339+
.. versionadded:: 3.15
340+
331341
.. method:: size()
332342

333343
Return the length of the file, which can be larger than the size of the

Doc/whatsnew/3.15.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,10 @@ mmap
581581
not be duplicated.
582582
(Contributed by Serhiy Storchaka in :gh:`78502`.)
583583

584+
* :meth:`mmap.mmap.set_name` method added to annotation an anonymous memory map
585+
if Linux kernel supports :manpage:`PR_SET_VMA_ANON_NAME <PR_SET_VMA(2const)>` (Linux 5.17 or newer).
586+
(Contributed by Donghee Na in :gh:`142419`.)
587+
584588

585589
os
586590
--

0 commit comments

Comments
 (0)