2021-02-21 | Paul Boddie | raw annotate files changeset graph | Constrain the receive flexpage size to appropriate sizes. If the receive flexpage is constrained by the maximum offset to an intermediate size (not a power of two page size multiple such as 1, 2, 4, 8...) then too large a flexpage will be sent and the "hot spot" incorrectly divided, resulting in stray accesses to neighbouring pages. |
1 #pragma once 2 3 #include "flexpage.h" 4 5 /* The owner of a flexpage. */ 6 7 class PageOwner 8 { 9 public: 10 virtual ~PageOwner() 11 { 12 } 13 14 virtual void fill(Flexpage *flexpage) 15 { 16 (void) flexpage; 17 } 18 19 virtual void flush(Flexpage *flexpage, bool purge) 20 { 21 (void) flexpage; (void) purge; 22 } 23 24 virtual void remove(Flexpage *flexpage) 25 { 26 (void) flexpage; 27 } 28 }; 29 30 // vim: tabstop=4 expandtab shiftwidth=4