We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b8f84fa + 64cb606 commit 554ea57Copy full SHA for 554ea57
src/dlmalloc.rs
@@ -130,6 +130,10 @@ impl<A> Dlmalloc<A> {
130
system_allocator,
131
}
132
133
+
134
+ pub fn allocator(&self) -> &A {
135
+ &self.system_allocator
136
+ }
137
138
139
impl<A: Allocator> Dlmalloc<A> {
src/lib.rs
@@ -206,4 +206,10 @@ impl<A: Allocator> Dlmalloc<A> {
206
pub unsafe fn destroy(self) -> usize {
207
self.0.destroy()
208
209
210
+ /// Get a reference the underlying [`Allocator`] that this `Dlmalloc` was
211
+ /// constructed with.
212
213
+ self.0.allocator()
214
215
0 commit comments