You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -34,44 +34,56 @@ I've spent a good amount of time testing IsoAlloc to ensure its reasonably fast
34
34
35
35
The `malloc_cmp_test` build target will build 2 different versions of the test/tests.c program which runs roughly 1.4 million alloc/calloc/realloc operations. We free every other allocation and then free the remaining ones once the allocation loop is complete. This helps simulate some fragmentation in the heap. On average IsoAlloc is faster than ptmalloc but the difference is so close it will likely not be noticable.
36
36
37
-
The following test was run in an Ubuntu 20.04for ARM64 docker container with libc version 2.31-0ubuntu9.2 on a MacOS host. The kernel used was `Linux 8772e39a0c20 5.10.25-linuxkit`.
37
+
The following test was run in an Ubuntu 20.04.3 LTS (Focal Fossa) for ARM64 docker container with libc version 2.31-0ubuntu9.2 on a MacOS host. The kernel used was `Linux f7f23ca7dc44 5.10.76-linuxkit`.
38
38
39
39
```
40
40
Running IsoAlloc Performance Test
41
41
42
-
iso_alloc/iso_free 1441616 tests completed in 0.146020 seconds
43
-
iso_calloc/iso_free 1441616 tests completed in 0.174673 seconds
44
-
iso_realloc/iso_free 1441616 tests completed in 0.249192 seconds
42
+
build/tests
43
+
iso_alloc/iso_free 1441616 tests completed in 0.168293 seconds
44
+
iso_calloc/iso_free 1441616 tests completed in 0.171274 seconds
45
+
iso_realloc/iso_free 1441616 tests completed in 0.231350 seconds
45
46
46
47
Running glibc/ptmalloc Performance Test
47
48
48
-
malloc/free 1441616 tests completed in 0.171125 seconds
49
-
calloc/free 1441616 tests completed in 0.228953 seconds
50
-
realloc/free 1441616 tests completed in 0.317215 seconds
49
+
malloc/free 1441616 tests completed in 0.166813 seconds
50
+
calloc/free 1441616 tests completed in 0.223232 seconds
51
+
realloc/free 1441616 tests completed in 0.306684 seconds
51
52
52
53
Running jemalloc Performance Test
53
54
54
-
malloc/free 1441616 tests completed in 0.059686 seconds
55
-
calloc/free 1441616 tests completed in 0.188510 seconds
56
-
realloc/free 1441616 tests completed in 0.190125 seconds
realloc/free 1441616 tests completed in 0.332292 seconds
92
104
```
93
105
94
-
Here is the same test as above on Mac OS 11.6
106
+
Here is the same test as above on Mac OS 12.1
95
107
96
108
```
97
109
Running IsoAlloc Performance Test
98
110
99
-
iso_alloc/iso_free 1441616 tests completed in 0.124150 seconds
100
-
iso_calloc/iso_free 1441616 tests completed in 0.182955 seconds
101
-
iso_realloc/iso_free 1441616 tests completed in 0.275084 seconds
111
+
build/tests
112
+
iso_alloc/iso_free 1441616 tests completed in 0.149818 seconds
113
+
iso_calloc/iso_free 1441616 tests completed in 0.183772 seconds
114
+
iso_realloc/iso_free 1441616 tests completed in 0.274413 seconds
102
115
103
116
Running system malloc Performance Test
104
117
105
-
malloc/free 1441616 tests completed in 0.090845 seconds
106
-
calloc/free 1441616 tests completed in 0.200397 seconds
107
-
realloc/free 1441616 tests completed in 0.254574 seconds
118
+
build/malloc_tests
119
+
malloc/free 1441616 tests completed in 0.084803 seconds
120
+
calloc/free 1441616 tests completed in 0.194901 seconds
121
+
realloc/free 1441616 tests completed in 0.240934 seconds
108
122
```
109
123
110
124
This same test can be used with the `perf` utility to measure basic stats like page faults and CPU utilization using both heap implementations. The output below is on the same AWS t2.xlarge instance as above.
@@ -153,35 +167,90 @@ The following benchmarks were collected from [mimalloc-bench](https://github.com
153
167
```
154
168
# benchmark allocator elapsed rss user sys page-faults page-reclaims
IsoAlloc isn't quite ready for performance sensitive server workloads but it's more than fast enough for client side mobile/desktop applications with risky C/C++ attack surface.
256
+
IsoAlloc isn't quite ready for performance sensitive server workloads. However it's more than fast enough for client side mobile/desktop applications with risky C/C++ attack surfaces. These environments have threat models similar to what IsoAlloc was designed for.
0 commit comments