[Home]  [Edit this page]  [Recent Changes]  [Special Pages]  [Help
CppMemory

(C++) memory

The physical space your computer uses to store values.

There are five major distinct memory areas [1]:
  • Const data: stores values known at compile-time
  • Stack: stores automatic variables
  • Free store: dynamic memory allocated/freed using new and delete
  • Heap: dynamic memory allocated/freed using malloc and free
  • Global/static: global and static variables that are initialized at run-time.
Prefer using the free store (using new and delete) [1]. Avoid using the heap (using malloc and free) [1].

Links

References



last edited (November 15, 2006) by bilderbikkel, Number of views: 2333, Current Rev: 5 (Diff)

[Edit this page]  [Page history]  [What links here]  [Discuss this topic]  [Printer Friendly]  

Members

Username:

Password:


Register
Forgot Password?




Programmers Heaven - for .NET, Java, C/C++ and WEB Developers!
© 1996-2008 Community Networks Ltd. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Tore Nestenius at .NET Consultant - Synchron Data.