Closed markcornwell closed 8 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.
Dumps the heap to stst.heap when program exits.
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).