On Thu Mar 21 17:18:22 2024 +0000, Jinoh Kang wrote:
So you have two options: fix `create_desktop` to properly initialize (x,y,last_change), or zero objects on free. I personally prefer the latter since we can rely on the fact that the shared memory is always zero after allocation, reduces risk of garbage data read, and enables opportinuities for THP or KSM (if it grows big enough).
I changed this to use valgrind annotations on alloc and free, as well as poisoning the memory. Note that I don't think we can zero the entire memory on free within SHARED_WRITE* because of the seq counter.