add debug stats for memory monitoring