3 ms·
I would not do that. Userspace Apps have way to many ways to screw up memory managment already. Allowing them to buf=malloc(128); free(buf, 256); seem
by ben_bai 10y ago
I would not do that. Userspace Apps have way to many ways to screw up memory managment already. Allowing them to
buf=malloc(128);
free(buf, 256);
seems dangerous, if free can't check the size.
But kernels sometimes do just that ( free(ptr, size) ), for performance reasons and because "kernel writers know what they are doing".