diff --git a/src/snmalloc/backend_helpers/defaultpagemapentry.h b/src/snmalloc/backend_helpers/defaultpagemapentry.h index 7001f45..f063ca7 100644 --- a/src/snmalloc/backend_helpers/defaultpagemapentry.h +++ b/src/snmalloc/backend_helpers/defaultpagemapentry.h @@ -9,7 +9,7 @@ namespace snmalloc * The following class could be replaced by: * * ``` - * using DefaultPagemapEntry = FrontendMetaEntry; + * using DefaultPagemapEntry = FrontendMetaEntry; * ``` * * The full form here provides an example of how to extend the pagemap @@ -17,7 +17,8 @@ namespace snmalloc * constructs meta entries, it only ever reads them or modifies them in * place. */ - class DefaultPagemapEntry : public FrontendMetaEntry + template + class DefaultPagemapEntryT : public FrontendMetaEntry { /** * The private initialising constructor is usable only by this back end. @@ -43,22 +44,25 @@ namespace snmalloc * metadata in meta entries when they are first constructed. */ SNMALLOC_FAST_PATH - DefaultPagemapEntry(FrontendSlabMetadata* meta, uintptr_t ras) - : FrontendMetaEntry(meta, ras) + DefaultPagemapEntryT(SlabMetadata* meta, uintptr_t ras) + : FrontendMetaEntry(meta, ras) {} /** * Copy assignment is used only by the pagemap. */ - DefaultPagemapEntry& operator=(const DefaultPagemapEntry& other) + DefaultPagemapEntryT& operator=(const DefaultPagemapEntryT& other) { - FrontendMetaEntry::operator=(other); + FrontendMetaEntry::operator=(other); return *this; } /** * Default constructor. This must be callable from the pagemap. */ - SNMALLOC_FAST_PATH DefaultPagemapEntry() = default; + SNMALLOC_FAST_PATH DefaultPagemapEntryT() = default; }; -} // namespace snmalloc \ No newline at end of file + + using DefaultPagemapEntry = DefaultPagemapEntryT; + +} // namespace snmalloc