From 45a31e75d14bd401e635a27b2c4c58969bcb0652 Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Mon, 25 Feb 2019 10:48:16 +0000 Subject: [PATCH] Add some comments. --- src/mem/largealloc.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mem/largealloc.h b/src/mem/largealloc.h index e06ec5c..ab89d11 100644 --- a/src/mem/largealloc.h +++ b/src/mem/largealloc.h @@ -33,8 +33,18 @@ namespace snmalloc } }; + /** + * A slab that has been decommitted. The first page remains committed and + * the only fields that are guaranteed to exist are the kind and next + * pointer from the superclass. + */ struct Decommittedslab : public Largeslab { + /** + * Constructor. Expected to be called via placement new into some memory + * that was formerly a superslab or large allocation and is now just some + * spare address space. + */ Decommittedslab() { kind = Decommitted;