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
Copy file name to clipboardExpand all lines: CACHE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# Thread caches
2
-
rpmalloc has a thread cache of free memory blocks which can be used in allocations without interfering with other threads or going to system to map more memory, as well as a global cache shared by all threads to let pages flow between threads. Configuring the size of these caches can be crucial to obtaining good performance while minimizing memory overhead blowup. Below is a simple case study using the benchmark tool to compare different thread cache configurations for rpmalloc.
2
+
rpmalloc has a thread cache of free memory blocks which can be used in allocations without interfering with other threads or going to system to map more memory, as well as a global cache shared by all threads to let spans of memory pages flow between threads. Configuring the size of these caches can be crucial to obtaining good performance while minimizing memory overhead blowup. Below is a simple case study using the benchmark tool to compare different thread cache configurations for rpmalloc.
3
3
4
4
The rpmalloc thread cache is configured to be unlimited, performance oriented as meaning default values, size oriented where both thread cache and global cache is reduced significantly, or disabled where both thread and global caches are disabled and completely free pages are directly unmapped.
Copy file name to clipboardExpand all lines: CHANGELOG
+21Lines changed: 21 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,24 @@
1
+
1.3.0
2
+
3
+
Make span size configurable and all spans equal in size, removing span size classes and streamlining the thread cache.
4
+
5
+
Allow super spans to be reserved in advance and split up in multiple used spans to reduce number of system calls. This will not increase committed physical pages, only reserved virtual memory space.
6
+
7
+
Allow super spans to be reused for allocations of lower size, breaking up the super span and storing remainder in thread cache in order to reduce load on global cache and reduce cache overhead.
8
+
9
+
Fixed an issue where an allocation of zero bytes would cause a segmentation fault from indexing size class array with index -1.
10
+
11
+
Fixed an issue where an allocation of maximum large block size (2097120 bytes) would index the heap cache array out of bounds and potentially cause a segmentation fault depending on earlier allocation patterns.
12
+
13
+
Fixed an issue where memory pages at start of aligned span run was not completely unmapped on POSIX systems.
14
+
15
+
Fixed an issue where spans were not correctly marked as owned by the heap after traversing the global span cache.
16
+
17
+
Added function to access the allocator configuration after initialization to find default values.
18
+
19
+
Removed allocated and reserved statistics to reduce code complexity.
20
+
21
+
1
22
1.2.2
2
23
3
24
Add configurable memory mapper providing map/unmap of memory pages. Default to VirtualAlloc/mmap if none provided. This allows rpmalloc to be used in contexts where memory is provided by internal means.
0 commit comments