Re: Copy-on-Write memory management



On Apr 26, 12:26 am, Michael Mol <mike...@xxxxxxxxx> wrote:
Let's say I wanted to implement a memory management system where I can
allocate a block of memory, write some data to it, and then clone it
in such a way that two separate pieces of code could own a copy of the
data, write to their copy, and when they read from their copy, they
saw their own written data there.

Now let's say that I want the clone operation to not result in an
increase in my footprint in the system memory until it was necessary
to write to the copy of the data.

Which operating systems, runtimes, libraries, architectures or
patterns have facilities which make this less difficult than it would
be without the facilities they provide?

(It's related to a performance-robustness balance problem I
occasionally encounter at work, but I'm mostly interested out of
personal curiosity; If my question seems ambiguous, it's because I'm
not looking for knowledge, not an exact solution.)

http://en.wikipedia.org/wiki/Copy_on_write
.



Relevant Pages

  • Copy-on-Write memory management
    ... Let's say I wanted to implement a memory management system where I can ... allocate a block of memory, write some data to it, and then clone it ... Now let's say that I want the clone operation to not result in an ... patterns have facilities which make this less difficult than it would ...
    (comp.programming)
  • [PATCH] Update of Documentation/
    ... -memory subsystem of the Linux kernel. ... -swapcache reclaim. ... -Contains, as a percentage of total system memory, the number of pages at which ...
    (Linux-Kernel)
  • [PATCH v3] Update of Documentation/
    ... -memory subsystem of the Linux kernel. ... -swapcache reclaim. ... as a percentage of the dirtyable system memory (free pages + mapped ...
    (Linux-Kernel)
  • Re: Out of Memory exception when trying to Clone a Bitmap
    ... Gdiplus will only allocate memory when the image is actually accessed. ... Since you are using a third party sdk, it seems that when gdiplus attempts ... If I clone using the EXACT bounds of the original bitmap it works fine. ...
    (microsoft.public.win32.programmer.gdi)
  • RE: XmlSerialization Object Memory Usage
    ... reading it in instead of new ComplexObj(). ... and a memory size of these objects. ... Simple Object contains a string, int and bool, as well as another complex ... If I call my 'clone' method on this object the size is reduced to 488K. ...
    (microsoft.public.dotnet.framework.performance)