Finding a VS Code Memory Leak

(randomascii.wordpress.com)

62 points | by brucedawson 7 hours ago

5 comments

  • brucedawson 7 hours ago
    In 2021 I found an invisible memory leak in a tool (VS Code) that I have never used. This is the story of how.
  • criemen 5 hours ago
    > For obscure technical reasons they are always multiples of four.

    Why did I know that that link went to Raymond Chen before clicking it... That man is a treasure.

  • anonymousDan 6 hours ago
    Re the last wish, isn't that exactly what ulimit is for?
    • diath 4 hours ago
      On Linux, yes, but this was Windows-specific code and Windows has no equivalent mechanism to ulimits.
  • anonymars 6 hours ago
    > Sometimes I think it would be nice to have limits on resources in order to more automatically find mistakes like this

    I was actually fairly disappointed when Visual Studio (not code) went to 64-bit. Because I knew its memory usage was now going to be unconstrained. Still way better than the unapologetic gluttony of Rider but experiences showed it to be a bit leaky over time (tip: Ctrl-Alt-Shift-F12 twice does a full garbage collection https://learn.microsoft.com/en-us/visualstudio/ide/visual-st...)

    Also remember that all your references (pointers) are going to double in size so right off the bat it will use more, potentially a lot more depending on how reference-heavy your data is

  • seivan 6 hours ago
    [dead]