From: Eric Wong Date: 2014-08-28T21:10:01+00:00 Subject: [ruby-core:64614] cowspace (work-in-progress) Hi all, I started working on a cowspace branch. Based on the mspace API of new versions of dlmalloc. The idea is to have a separate malloc space for long-lived, WORM (write once, read many) data which may increase memory sharing for forked processes. The mspace API is similar to normal malloc: malloc(size) => mspace_malloc(GET_VM()->cowspace, size) free(ptr) => mspace_free(GET_VM()->cowspace, ptr) ... There are rb_cow_(malloc/free/...) function wrappers as well as COW_(ALLOC/ZALLOC) macros to ease migrations. However, I haven't found any benefits, yet. _Maintaining_ CoW-friendliness is difficult in long-term so it might not be worth it (compared to overall memory reductions). http://bogomips.org/ruby.git/log/?h=cowspace (git clone git://bogomips.org/ruby.git / branch: cowspace)