markcornwell / pilar

incremental development of scheme compiler
1 stars 0 forks source link

Implement a heap dump in runtime.c #10

Closed markcornwell closed 8 years ago

markcornwell commented 9 years ago

As an aid to debugging heap allocation, add a command line option to the main in runtime.c that will dump the contents of the heap. Simply printing the hex addresses and the hex contents should be fine. Something very basic in order to look at the heap directly. Have runtime.c call a C routine after returning from the scheme_entry. A simple routine void dump(char heap; int words) to dump the given number of words in a simple table of (address, contents).

markcornwell commented 9 years ago

Got a start on this yesterday. Intend to modify it to write the heap dump to the stderr so that it does not interfere with the test infrastructure which compares stdout results with a value specified in the test. Will write the heap dump to a diagnostics file with a name like stst.d.

markcornwell commented 8 years ago

Dumps the heap to stst.heap when program exits.