2023年2月11日のブックマーク (4件)

  • v8 heapTotal keeps rising when heapUsed does not · Issue #1484 · nodejs/help

    tasshi820
    tasshi820 2023/02/11
    “You should consider that RSS is actually not an intrinsic measure of your code, but its also competitive with whatever else is in your workload at the time - that is, all other processing, including the OS.”
  • Process | Node.js v22.4.0 Documentation

    Process# Source Code: lib/process.js The process object provides information about, and control over, the current Node.js process. import process from 'node:process';const process = require('node:process');copy Process events# The process object is an instance of EventEmitter. Event: 'beforeExit'# The 'beforeExit' event is emitted when Node.js empties its event loop and has no additional work to s

    tasshi820
    tasshi820 2023/02/11
    “Resident Set Size, is the amount of space occupied in the main memory device (that is a subset of the total allocated memory) for the process, including all C++ and JavaScript objects and code.”
  • メモリー管理 - JavaScript | MDN

    C のような低水準言語には、malloc() や free() のような低水準のメモリー管理プリミティブがあります。これに対して JavaScript では、オブジェクトを作成するときにメモリーを自動的に確保し、使用しなくなったらメモリーを解放します(ガーベジコレクション)。この自動性が混乱の元になる可能性があります。メモリー管理について心配する必要がないという誤った印象を開発者に与える可能性があります。 プログラミング言語に関係なく、メモリーのライフサイクルはほぼいつも同じです。 必要なメモリーを割り当てる 割り当てられたメモリーを使用する(読み込む, 書き込む) 必要なくなったら、割り当てられたメモリーを解放する 2 に関してはすべての言語で明示的に行われます。1 と 3 は低水準の言語では明示的ですが、JavaScript のような高水準言語では、ほとんどの場合暗黙的に行われます。

    メモリー管理 - JavaScript | MDN
    tasshi820
    tasshi820 2023/02/11
  • 北朝鮮に鉄道マニア34人で押しかけた話|twinrail

    大学の卒業旅行を計画していたら、twitterで知り合った鉄道マニア33人を北朝鮮に連れていくことになった。 北朝鮮の電車に興奮する日の鉄道マニアと、日の鉄道マニアに困惑する北朝鮮のガイドの、異文化交流の記録。 北朝鮮に行く、そこに鉄道があるからこれを読んでいるあなたは、北朝鮮に対してどんなイメージを持っているだろうか? たいていの人が「ミサイル」「核実験」「拉致問題」のようなキーワードを挙げるのではないだろうか。「旅行したい」という発想を思いつく人はほとんどいないのではないかと思う。 しかし、一部の鉄道マニアにとって、北朝鮮ほど魅力的な場所はない。「世界中から注目されながらも、今なお深い謎に包まれた鉄道」が走る北朝鮮に、好奇心をくすぐられないわけがなかった。 ある登山家が「なぜエベレストに登るのか?」と問われて「そこにエベレストがあるからだ」と答えた逸話がある。同じように、私も「なぜ

    北朝鮮に鉄道マニア34人で押しかけた話|twinrail
    tasshi820
    tasshi820 2023/02/11
    全てを「鉄道が好き」で走破していくスタイルめっちゃ良かった