copy-on-write Questions

3

Solved

Suppose I want to have two variables and have them both equal to null. (More realistically, I am thinking about an array that contains a large amount of nulls, but the "two variables" scenario is s...
Ichnography asked 21/4, 2012 at 15:26

1

I am a programmer developing a multiplayer online game using Linux based servers. We use an "instanced" architecture for our world. This means that each player entering a world area gets a copy of ...
Nestle asked 24/3, 2012 at 11:2

1

Solved

Is there a way to select a subset from objects (data frames, matrices, vectors) without making a copy of selected data? I work with quite large data sets, but never change them. However often for...
Osmo asked 5/3, 2012 at 19:55

2

Solved

Does Go language use Copy-on-write for strings as in Java? I.e. if I pass a string by value to a method and never change it will this allocate memory and copy the string (which will be time i...
Briton asked 16/12, 2011 at 9:26

4

Solved

Suppose I copy an existing list: existing_list = [ 1, 2, 3 ]; copied_list = existing_list[:] ... copied_list[2] = 'a' // COW happens here [Some edits] I heard that Python uses copy-on-write w...
Hebephrenia asked 2/11, 2011 at 13:40

3

I just saw this nice copy-on-write pointer implementation. It looks pretty generic and useful, so my question is: Is such a class contained in any of the C++ toolkits (boost, loki, etc.)? If not, I...
Stoush asked 28/2, 2010 at 2:55

2

Solved

Here is my code int main() { pid_t pid; int y = 3; if ( (pid = fork()) <0 ) return -1;; if( pid == 0 ) /* child */ { printf(" before: %d %p\n", y, &y ); y *= 10; printf("after: %...
Interracial asked 31/8, 2011 at 7:8

2

Solved

I have searched the web and read through the Boost documentation about shared_ptr. There is a response on SO that says that shared_ptr for Copy-On-Write (COW) sucks and that TR! has removed it from...
Trochal asked 5/6, 2011 at 19:16

6

Solved

When I create a copy-on-write mapping (a MAP_PRIVATE) using mmap, then some pages of this mapping will be copied as soon as I write to specific addresses. At a certain point in my program I would l...
Buttaro asked 18/12, 2010 at 10:27

7

Solved

we have a multi-threaded desktop application in C++ (MFC). Currently developers use either CString or std::string, probably depending on their mood. So we'd like to choose a single implementation (...
Chock asked 17/1, 2011 at 14:55

1

Solved

I am building a game engine library in C++. A little while back I was using Qt to build an application and was rather fascinated with its use of Implicit Sharing. I am wondering if anybody could ex...
Starvation asked 9/1, 2011 at 6:15

2

Following up on the discussion from this question, I was wondering how does one using native C++ determine programmatically whether or not the std::string implementation they are using utilizes Cop...
Territorial asked 21/12, 2010 at 3:59

5

Solved

I distinctly remember from the early days of .NET that calling ToString on a StringBuilder used to provide the new string object (to be returned) with the internal char buffer used by StringBuilder...
Tema asked 12/11, 2010 at 15:30

5

STL standard do not require from std::string to be refcounted. But in fact most of C++ implementations provide refcounted, copy-on-write strings, allowing you passing string by value as a primitive...
Entrap asked 1/4, 2009 at 19:33

© 2022 - 2024 — McMap. All rights reserved.