[issue9942] Allow memory sections to be OS MERGEABLE

Kevin Hunter report at bugs.python.org
Fri Sep 24 19:52:39 CEST 2010

New submission from Kevin Hunter <hunteke at earlham.edu>:

Should Python enable a way for folks to inform the OS of MADV_MERGEABLE memory?

I can't speak for other OSs, but Linux added the ability for processes to inform the kernel that they have memory that will likely not change for a while in 2.6.32.  This is done through the madvise syscall with MADV_MERGEABLE.


After initial conversations in IRC, it was suggested that this would be difficult in the Python layer, but that the OS doesn't care what byte page it's passed as "mergeable".  Thus when I, as an application programmer, know that I have some objects that will be around "for awhile", and that won't change, I can let the OS know that it might be beneficial to merge them.

I suggest this might be a library because it may only be useful for certain projects.

components: Library (Lib)
messages: 117317
nosy: hunteke
priority: normal
severity: normal
status: open
title: Allow memory sections to be OS MERGEABLE
type: feature request

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list