Skip to content

Multi line cursors cause heap exhaustion #2098

@ethanxxxl

Description

@ethanxxxl

When I use multiple cursors relatively extensively, eventually Lem crashes and spits out this error:

Heap exhausted during allocation: 81100800 bytes available, 652147216 requested.
     | Immobile Objects |
 Gen layout symbol   code  Boxed   Cons    Raw   Code  SmMix  Mixed  LgRaw LgCode  LgMix Waste%       Alloc        Trig   Dirty GCs Mem-age
  1      0      0      0      2     12      2      0      3      6  23885      0      0    0.1   782921008    10737418   23888   0  0.3895
  2    113      4    117     51     30     17      1      5     21   1212      0      0    1.5    43158416     2000000    1233   0  0.0000
  3      0      0      0      0      0      0      0      0      0      0      0      0    0.0           0     2000000       0   0  0.0000
  4      0      0      0      0      0      0      0      0      0      0      0      0    0.0           0     2000000       0   0  0.0000
  5      0      0      0      0      0      0      0      0      0      0      0      0    0.0           0     2000000       0   0  0.0000
  6   4031  31373  47806    810    630    288     26    106     88     51      0    106    2.8    67044688     2000000      35   0  0.0000
Tot   4144  31377  47923    863    672    307     27    114    115  25148      0    106    0.4   893124112 [83.2% of 1073741824 max]
GC control variables:
   *GC-INHIBIT* = false
   *GC-PENDING* = true
   *STOP-FOR-GC-PENDING* = false
Collection trigger variables:
   dynamic_space_size = 1073741824
   bytes_allocated = 893124112
   auto_gc_trigger = 946811203
   bytes_consed_between_gcs = 53687091

I haven't done extensive testing to see what the root cause is, but it has happened a few times so far, maybe someone can replicate?
I was using C-mode and covering large areas with multiple cursors to insert comments/change indentation. (about 70-80 lines at a time).

The crash didn't happen all at once probably after 5-10 operations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions