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: CMakeLists.txt
+35-14
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,12 @@ cmake_dependent_option(SNMALLOC_STATIC_LIBRARY "Build static libraries" ON "NOT
37
37
cmake_dependent_option(SNMALLOC_CHECK_LOADS "Perform bounds checks on the source argument to memcpy with heap objects"OFF"NOT SNMALLOC_HEADER_ONLY_LIBRARY"OFF)
38
38
cmake_dependent_option(SNMALLOC_OPTIMISE_FOR_CURRENT_MACHINE "Compile for current machine architecture"Off"NOT SNMALLOC_HEADER_ONLY_LIBRARY"OFF)
39
39
cmake_dependent_option(SNMALLOC_PAGEID "Set an id to memory regions"OFF"NOT SNMALLOC_PAGEID"OFF)
40
+
41
+
# GwpAsan secondary allocator
42
+
option(SNMALLOC_ENABLE_GWP_ASAN_INTEGRATION "Enable GwpAsan as a secondary allocator"OFF)
Copy file name to clipboardExpand all lines: docs/AddressSpace.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -16,10 +16,10 @@ For simplicity, we assume that
16
16
Since this is the first allocation, all the internal caches will be empty, and so we will hit all the slow paths.
17
17
For simplicity, we gloss over much of the "lazy initialization" that would actually be implied by a first allocation.
18
18
19
-
1. The `LocalAlloc::small_alloc` finds that it cannot satisfy the request because its `LocalCache`lacks a free list for this size class.
20
-
The request is delegated, unchanged, to `CoreAllocator::small_alloc`.
19
+
1. The `Allocator::small_alloc` finds that it cannot satisfy the request because its lacks a fast free list for this size class.
20
+
The request is delegated, unchanged, to `Allocator::small_refill`.
21
21
22
-
2. The `CoreAllocator` has no active slab for this sizeclass, so `CoreAllocator::small_alloc_slow` delegates to `BackendAllocator::alloc_chunk`.
22
+
2. The `Allocator` has no active slab for this sizeclass, so `Allocator::small_refill_slow` delegates to `BackendAllocator::alloc_chunk`.
23
23
At this point, the allocation request is enlarged to one or a few chunks (a small counting number multiple of `MIN_CHUNK_SIZE`, which is typically 16KiB); see `sizeclass_to_slab_size`.
24
24
25
25
3.`BackendAllocator::alloc_chunk` at this point splits the allocation request in two, allocating both the chunk's metadata structure (of size `PAGEMAP_METADATA_STRUCT_SIZE`) and the chunk itself (a multiple of `MIN_CHUNK_SIZE`).
Copy file name to clipboardExpand all lines: src/snmalloc/README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ These are arranged in a hierarchy such that each of the directories may include
20
20
This includes data structures such as pagemap implementations (efficient maps from a chunk address to associated metadata) and buddy allocators for managing address-space ranges.
21
21
-`backend/` provides some example implementations for snmalloc embeddings that provide a global memory allocator for an address space.
22
22
Users may ignore this entirely and use the types in `mem/` with a custom back end to expose an snmalloc instance with specific behaviour.
23
-
Layers above this can be used with a custom configuration by defining `SNMALLOC_PROVIDE_OWN_CONFIG` and exporting a type as `snmalloc::Alloc` that defines the type of an `snmalloc::LocalAllocator` template specialisation.
23
+
Layers above this can be used with a custom configuration by defining `SNMALLOC_PROVIDE_OWN_CONFIG` and exporting a type as `snmalloc::Config` that defines the configuration.
24
24
-`global/` provides some front-end components that assume that snmalloc is available in a global configuration.
25
25
-`override/` builds on top of `global/` to provide specific implementations with compatibility with external specifications (for example C `malloc`, C++ `operator new`, jemalloc's `*allocx`, or Rust's `std::alloc`).
0 commit comments