3 ms·
Heh, I've had similar thoughts about "safe MAP_UNINITIALIZED", although the demand for this feature is probably pretty low since you can do much the same thing
by BeeOnRope 7y ago
Heh, I've had similar thoughts about "safe MAP_UNINITIALIZED", although the demand for this feature is probably pretty low since you can do much the same thing in userspace (just don't return that memory in the first place).
Of course, the kernel way has some advantages:
- You are making the memory available to the rest of the system if needed.
- It could give you other types of pages w/o privileged info, e.g., page cache pages from files you have permission to read, or something like that.