File tree Expand file tree Collapse file tree 3 files changed +54
-13
lines changed Expand file tree Collapse file tree 3 files changed +54
-13
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "backtraces": {
3
+ "mean": 2.3829520464,
4
+ "stddev": 0.07651981051526706
5
+ },
6
+ "big-allocs": {
7
+ "mean": 0.1673647059473684,
8
+ "stddev": 0.013478818300072831
9
+ },
10
+ "mse": {
11
+ "mean": 0.8133679916000001,
12
+ "stddev": 0.050075600632164104
13
+ },
14
+ "range-iteration": {
15
+ "mean": 4.243566763599999,
16
+ "stddev": 0.03380701243732224
17
+ },
18
+ "serde1": {
19
+ "mean": 2.589135003,
20
+ "stddev": 0.0700829518878718
21
+ },
22
+ "serde2": {
23
+ "mean": 5.955532229,
24
+ "stddev": 0.20599769835375004
25
+ },
26
+ "slice-chunked": {
27
+ "mean": 0.4702839168333333,
28
+ "stddev": 0.017522346103318015
29
+ },
30
+ "slice-get-unchecked": {
31
+ "mean": 0.8169163450000001,
32
+ "stddev": 0.013873697449548328
33
+ },
34
+ "string-replace": {
35
+ "mean": 0.5258388794,
36
+ "stddev": 0.032950972318742694
37
+ },
38
+ "unicode": {
39
+ "mean": 3.4562345727999997,
40
+ "stddev": 0.11276913990962134
41
+ },
42
+ "zip-equal": {
43
+ "mean": 3.0626452212,
44
+ "stddev": 0.0554291549675083
45
+ }
46
+ }
Original file line number Diff line number Diff line change @@ -333,9 +333,12 @@ mod tests {
333
333
}
334
334
}
335
335
336
- /// Checks that allocations of different sizes do not overlap. Not a freestanding
337
- /// test because we use it as part of `check_leaks()` also.
338
- fn no_overlaps ( alloc : & mut IsolatedAlloc ) {
336
+ /// Checks that allocations of different sizes do not overlap, then for memory
337
+ /// leaks that might have occurred.
338
+ #[ test]
339
+ fn check_leaks_and_overlaps ( ) {
340
+ let mut alloc = IsolatedAlloc :: new ( ) ;
341
+
339
342
// Some random sizes and aligns
340
343
let mut sizes = vec ! [ 32 ; 10 ] ;
341
344
sizes. append ( & mut vec ! [ 15 ; 4 ] ) ;
@@ -374,16 +377,8 @@ mod tests {
374
377
alloc. dealloc ( ptr, layout) ;
375
378
}
376
379
}
377
- }
378
-
379
- /// Check for memory leaks after repeated allocations and deallocations.
380
- #[ test]
381
- fn check_leaks ( ) {
382
- let mut alloc = IsolatedAlloc :: new ( ) ;
383
- // Generate some noise first so leaks can manifest
384
- no_overlaps ( & mut alloc) ;
385
380
386
- // And then verify that no memory was leaked
381
+ // And then verify that no memory was leaked after all that
387
382
assert ! ( alloc. page_ptrs. is_empty( ) && alloc. huge_ptrs. is_empty( ) ) ;
388
383
}
389
384
}
Original file line number Diff line number Diff line change @@ -906,7 +906,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
906
906
interp_ok ( MiriAllocBytes :: from_bytes (
907
907
std:: borrow:: Cow :: Borrowed ( bytes) ,
908
908
align,
909
- params. clone ( ) ,
909
+ params,
910
910
) )
911
911
} ,
912
912
|ptr| this. global_root_pointer ( ptr) ,
You can’t perform that action at this time.
0 commit comments