memory Management

Pages: 12
closed account (9wqjE3v7)
No, you're wrong. If we're talking Windows, Linux or Unix, they *are not* direct system calls. They are userland routines. OS does not give ability to allocate memory in 3-byte blocks, like new allows.


Thanks for clearing that up...I am confusing myself. Though system calls can be used for memory allocation in 'kernel land' INDEPENDENT of new and delete if a process requests it. Though I guess it could depend on the kernel architecture so there is no definite answer for every OS implementation...
Last edited on
rapidcoder wrote:
Freeing non-shared memory/resources is just as easy with or without RAII. There is try-with-resources / try-finally construct in C# and in Java, and forgetting to use it is signalled enough visibly that it is never a problem.
In C++ there is no 'forgetting to use' try-with-resources or try-finally because of RAII. I'm not sure what your definition of 'easy' is but it doesn't match mine ;)
Last edited on
Topic archived. No new replies allowed.
Pages: 12