You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
A recent article on WebAssembly Garbage Collection (WasmGC) explains at a high level how the Garbage Collection (GC) proposal aims to better support GC languages in Wasm, which is very important given their popularity. In this article, we will get into the technical details of how GC languages such as Java, Kotlin, Dart, Python, and C# can be ported to Wasm. There are in fact two main approaches:
さて、今回はrurubyにおけるオブジェクトのメモリ表現と、これをハンドリングするアロケータ・ガベージコレクタについて解説します。 Rubyオブジェクトのデータ構造 まず、動的型付き3オブジェクト指向言語であるRubyにおけるオブジェクトがrurubyの内部でどのように表現されているかを説明します。rurubyのオブジェクトの内部表現はCRubyのそれに大変よく似ていて4、笹田さんの連載記事(WEB+DB PRESS Vol.110「Rubyのウラガワ」)の第1回に大変分かりやすく解説されているので正直そちらを見て頂いた方がよいのですが、今回の本題であるメモリ管理の説明の前提として必要な話なので、ここで簡単に説明します。 Value rurubyのオブジェクトは内部的にはValueと呼ぶ8バイトの構造体で表現されます。Rubyオブジェクトの全情報を8バイトで表現するのは当然無理なので、基本
This is a guest post by Domen Kožar. In this post I’ll dive into how low-latency garbage collection (GC) has improved developer experience for Cachix users. The need for low latency Cachix serves the binary cache protocol for the Nix package manager. Before Nix builds a package, it will ask the binary cache if it contains the binary for a given package it wants to build. For a typical invocation o
At Channable, we process several billion product data records for our customers every day according to user-customizable rules. Internally, this work is subdivided into jobs, where one job takes a set of products and the rules for how to process them as input, and returns the transformed set of products as output. Those datasets range from a few dozen to tens of millions of products in size. The a
現在ghc最新は8.6です。 Compact Regionsはghc-8.2から搭載された機能です。 Compact RegionsはGC中に走査されない、連続したメモリ領域に載ったデータを提供します。 Hackage / compact: Non-GC'd, contiguous storage for immutable data structures サーバーにバッチ処理で生成しておいたデータ(数百MBから数十GBくらいでしょうか)を持たせておくことを考えましょう。そのデータはサーバーがリクエストを捌く際にRead Onlyでアクセスされるとします。 そういうこと自体は問題によりますが、まあよくやることと思います。Redis等にアクセスするにもネットワークは遅すぎる、手元のKVSでも毎回デシリアライズ発生するのは遅すぎるといったケースですね。 しかしGHCのようなGC持つ処理系でサー
Shenandoah GCShenandoah is the low pause time garbage collector that reduces GC pause times by performing more garbage collection work concurrently with the running Java program. Shenandoah does the bulk of GC work concurrently, including the concurrent compaction, which means its pause times are no longer directly proportional to the size of the heap. Garbage collecting a 200 GB heap or a 2 GB he
A few weeks ago we started a series aimed at digging deeper into JavaScript and how it actually works: we thought that by knowing the building blocks of JavaScript and how they come to play together you’ll be able to write better code and apps. The first post of the series focused on providing an overview of the engine, the runtime, and the call stack. Thе second post examined closely the internal
インクルードするだけで使えるNon-movingで正確なGCをC言語用に作りました。 行数がコメントを除いて100行に満たない非常に小さなライブラリです。 GCのアルゴリズムとしてはCheneyのコピーGCを採用しています。 通常のCheneyのコピーGCではメモリ空間のうち半分が無駄になってしまいメモリ効率が悪かったり、 GC発生時にオブジェクトが移動してしまいC言語のようなポインタを直接触れる言語との相性が悪いという欠点がありました。 今回はヒープ全体を二重連結リストとして管理することでそのような問題を解決しています。 ちなみにこれはTreadmill GCのアイデアと同じです。(が、アルゴリズム自体はTreadmill GCではありません。) APIはLinuxのlist.hに非常に近い見た目になっています。 ある構造体をgcで管理したい場合はstruct gc_head型のメンバを
Non-GC'd, contiguous storage for immutable data structures. This package provides user-facing APIs for working with "compact regions", which hold a fully evaluated Haskell object graph. These regions maintain the invariant that no pointers live inside the struct that point outside it, which ensures efficient garbage collection without ever reading the structure contents (effectively, it works as a
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く