On Thu Mar 21 17:14:56 2024 +0000, Jinoh Kang wrote:
It is, but `create_desktop` memset()s cursor to zero. We pulled (x,y,last_change) out of the cursor, leaving them uninitialized.
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).