Garbage Collector in Ruby 2.2 Provokes Unexpected Cow

Proper garbage collection with linked list in Ruby?

When the garbage collector run, it will see that node is no more referenced from the objects in your application and it will be deallocated.

You won't need to manually destroy it.

Does all memory flagged as copy-on-write get copied after a single change to one piece of the data?

Memory is organized in pages, generally 4K each (this can be set to different values, and is hardware-specific, but that's the norm on Intel platforms with standard operating systems). When a child process writes into a copy-on-write page, it will be copied.



Related Topics



Leave a reply



Submit