dennis95 / dennix

Dennix is a unix-like hobbyist operating system written from scratch.
ISC License
163 stars 13 forks source link

Check memory allocations in the kernel #4

Closed dennis95 closed 4 years ago

dennis95 commented 7 years ago

This is problematic because gcc assumes that new can never return NULL. Also there is the problem that constructors cannot fail on allocation failure.

dennis95 commented 4 years ago

This has been fixed. Allocation failures in constructors can now be handled by inheriting from ConstructorMayFail and using FAIL_CONSTRUCTOR.