Skip to content

Lists memory areas and their location in descending order

/*
 *  mem_sequence.c / ver 0x01 | (C)opyleft 2008 by oozie |  http://blog.ooz.ie/
 *  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 *  Lists memory areas and their location in descending order.
 *
 *  This program declares example variables in different memory locations, gets
 *  their addresses, sorts them and prints a list in descending order. 
 *
 *  The program is considered free software; you can redistribute and/or modify
 *  it under the terms of the GNU General Public License version 3 or any later
 *  version, as published by the Free Software Foundation; If you do modify it, 
 *  please leave the  information about the author unchanged.  The full text of 
 *  latest GPL licence is available at      http://www.gnu.org/licences/gpl.txt
 */
                           1.(0xbf9a7d34) stack
                           2.(0x08590008) heap
                           3.(0x080497f0) bss
                           4.(0x080486a0) const's
                           5.(0x08048595) code

Download source:
wget http://sprunge.us/IJVT -O memseq.c