-
- Downloads
Fix memory leaks in mmap/munmap
mmap/munmap and its cousins mmu::map_*() used to leak the 48-byte "vma" object, twice. The idea to separate reserve() and map() was a good one, but it was implemented incorrectly causing a vma object to be allocated twice per mmap, and both of them were leaked when evacuate() didn't free them. So switched to a simpler implementation, where the "vma" object is internal to mmu.cc, and not used by any of the callers; The struct vma is now properly allocated only once per mmap(), and freed on munmap().
Loading
Please register or sign in to comment