added 'trace_memory' flag to easily enable SGList tracing