Commit b2cf5df
committed
Switch mimalloc guards to assertions
The thin mimalloc API is currently defensive around incorrect setup/teardown by
guarding against using/destroying the arena when the heap is null, or creating
an arena when it already exists.
The only time these checks will fail is when the code is wrong, e.g. trying
to use libdom before or after freeing the arena. The current behavior can mask
these errors, plus add runtime overhead.1 parent f66f4d9 commit b2cf5df
4 files changed
+18
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | | - | |
| 37 | + | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | | - | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | | - | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | | - | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | | - | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
63 | | - | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
68 | | - | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
334 | 337 | | |
335 | 338 | | |
336 | 339 | | |
| |||
366 | 369 | | |
367 | 370 | | |
368 | 371 | | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
369 | 375 | | |
370 | 376 | | |
371 | 377 | | |
| |||
417 | 423 | | |
418 | 424 | | |
419 | 425 | | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
420 | 429 | | |
421 | 430 | | |
422 | 431 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
125 | 124 | | |
126 | 125 | | |
127 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | 214 | | |
218 | 215 | | |
219 | 216 | | |
| |||
224 | 221 | | |
225 | 222 | | |
226 | 223 | | |
227 | | - | |
228 | 224 | | |
229 | 225 | | |
230 | 226 | | |
| |||
375 | 371 | | |
376 | 372 | | |
377 | 373 | | |
378 | | - | |
379 | | - | |
380 | 374 | | |
381 | 375 | | |
382 | 376 | | |
| |||
493 | 487 | | |
494 | 488 | | |
495 | 489 | | |
496 | | - | |
497 | | - | |
498 | 490 | | |
499 | 491 | | |
500 | 492 | | |
501 | 493 | | |
502 | 494 | | |
503 | 495 | | |
504 | | - | |
505 | 496 | | |
506 | 497 | | |
0 commit comments