Is there any way I can see the compiler generated code for me.( c++/Unix )
I want to know in deatils how memory management is carried on .. I mean can you suugest me a website for it ...
Your question may not help with what you want.
As to whether you can see the code generated by your compiler - that depends on the compiler you are using. The same goes as to how you would instruct the compiler do this.
Note that telling me you are using C++ on UN*X does not help too much. Each flavour of UN*X has one or more compilers supplied by the vendor and then there are third party compilers such as the GNU and KAI/Intel compilers.
With many UN*X compilers I know you used to be able to obtain C code output which can then be compiled through a C compiler before linking.
I also know that you can obtain an assembler listing output for the GNU compiler using the -S command line option (compile but do not assemble or link) - as this produces an assembler input file as the compilation output. Other UN*X compilers may have the same or a similar command line option. Note though that you _will_ need to understand the assembler language the compiler generates files for, and that unravelling compiler generated code is not that easy. I would also suggest you turn off all optimisations as this will only obfuscate the assembler code further.
The other options are to disassemble an executable or object file or to view running code in a suitable debugger.
That answers your question. However, it will not necessarily get you the information that you then go on to state you are interested in - memory management.
If the part of memory management you are interesting in is the dynamic memory allocation / deallocation handling by your C++ compiler you may have to look in the C and/or C++ run time language support libraries. Many C++ implementations of the default global operators new and delete simply wrap (or use pretty much the same code as) the C malloc/free functions to obtain raw memory and then call constructors of the objects to be created or call the destructors of those being destroyed before returning a raw memory block.
Another area to look in is the implementation of, and add-ons to, the standard C++ library as many of the class templates in this library take an allocator type as one of the template parameters. The default ones rely on the new and delete operators, but some suppliers have additional allocators available (possibly as a separate product - see http://www.dinkumware.com/libDCorX.html
for an example).
Also remember that individual classes can provide their own new and delete operator functions and the global operator new and delete functions can be replaced. In these case you would additionally need to look at the C++ source to sort out what is going on.
Finally, you will in most cases find that the C/C++ language support for dynamic memory management will sit on top of the operating system support. This will of course be true UN*X systems.
As you do not say why you wish to know about this area I cannot help further. If it is just for academic reasons then you should probably also get hold of some books on compilers and operating system technicalities.
As to web sites and other resources - well I would suggest you check out your compiler vendor / supplier site and documentation as a first port of call.
If you require the details of their runtime library then you may have to see if they supply the source code for it (but they may charge a fee).
The GNU compiler site can be found at http://gcc.gnu.org/
and you should be able to download the source code for it and its libraries. Note the compiler support library is called libgcc. You should be able to dig out lots of compiler internals information here as well (see the documentation page http://gcc.gnu.org/onlinedocs
). You might also like to browse the links on their further readings page at http://gcc.gnu.org/readings.html
Specifically I found that GCC can produce builtin (intrinsic) functions for malloc and free, otherwise (as far as I can tell) it relies on a version of the C runtime library (libc) supplied with the OS - or maybe as a 3rd party version such as the GNU C library (which probably is the standard OS C library for the likes of GNU/Linux and HURD). I suspect it emits code sequences around calls to malloc and free for default operator new and delete support in C++, but could not dig out any explicit information on this. So in this case you would have to read the assembler output - or do more research than I did into the documentation and sources.
Hope this is of use and happy hunting...