From 48340faa09a5957579cc448fcf76e09a9350da21 Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Sat, 10 Dec 2022 10:53:56 +0000 Subject: [PATCH] NFC: ds/pagemap: tweak commentary --- src/snmalloc/ds/pagemap.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/snmalloc/ds/pagemap.h b/src/snmalloc/ds/pagemap.h index 765a3eb..f566771 100644 --- a/src/snmalloc/ds/pagemap.h +++ b/src/snmalloc/ds/pagemap.h @@ -250,10 +250,13 @@ namespace snmalloc } /** + * + * Get a non-constant reference to the slot of this pagemap corresponding + * to a particular address. + * * If the location has not been used before, then - * `potentially_out_of_range` should be set to true. - * This will ensure there is a location for the - * read/write. + * `potentially_out_of_range` should be set to true. This will ensure + * there is memory backing the returned reference. */ template T& get_mut(address_t p) @@ -301,10 +304,12 @@ namespace snmalloc } /** + * Get a constant reference to the slot of this pagemap corresponding to a + * particular address. + * * If the location has not been used before, then - * `potentially_out_of_range` should be set to true. - * This will ensure there is a location for the - * read/write. + * `potentially_out_of_range` should be set to true. This will ensure + * there is memory backing any reads through the returned reference. */ template const T& get(address_t p)