▲ | IshKebab 5 days ago | |||||||
> It is no accident that these have proven to be memory safe in practice; they would not be usable if they weren’t. Can't agree there. Why wouldn't they be usable if they weren't memory safe? Can you give me an example of this mythical "memory safe in practice" database? Not Postgresql at least: https://www.postgresql.org/support/security/ | ||||||||
▲ | jandrewrogers 5 days ago | parent [-] | |||||||
Database kernels have some of the strictest resource behavior constraints of all software. Every one I have worked on in vaguely recent memory has managed memory. There is no dynamic allocation from the OS. Many invariants important to databases rely on strict control of resource behavior. An enormous amount of optimization is dependent on this, so performance-engineered systems generally don’t have issues with memory safety. Modern database kernels are memory-bandwidth bound. Micro-managing the memory is a core mechanic as a consequence. It is difficult to micro-manage memory with extreme efficiency if it isn’t implicitly safe. Companies routinely run formal model checkers like TLA+ on these implementations. It isn’t a rando spaffing C++ code. I’ve used PostgreSQL a lot but no one thinks of it as highly optimized. | ||||||||
|