#6 test how a static 0 buf performs vs. implicit CoW

Offen
vor 1 Jahr geöffnet von j3tracey · 0 Kommentare
Justin Tracey kommentierte vor 1 Jahr

All message bodies as sent on the wire are some number of 0 bytes. Currently, we're relying on the hope that the malloc implementation we boil down to is smart enough to have a good-sized 0-buf that can be allocated via CoW, so that no actual allocations need to occur for the message bodies. It might be a good idea to double check this (or similar) is what's happening by creating a static buffer of [0u8; MAX_MESSAGE_SIZE] that would presumably end up in the executable .bss, and making message bodies slices into that static buffer, then comparing their performance and memory overhead.

All message bodies as sent on the wire are some number of 0 bytes. Currently, we're relying on the hope that the malloc implementation we boil down to is smart enough to have a good-sized 0-buf that can be allocated via CoW, so that no actual allocations need to occur for the message bodies. It might be a good idea to double check this (or similar) is what's happening by creating a static buffer of `[0u8; MAX_MESSAGE_SIZE]` that would presumably end up in the executable `.bss`, and making message bodies slices into that static buffer, then comparing their performance and memory overhead.
Anmelden, um an der Diskussion teilzunehmen.
Kein Meilenstein
Niemand zuständig
1 Beteiligte
Laden…
Abbrechen
Speichern
Hier gibt es bis jetzt noch keinen Inhalt.