Author: Stan Eisenstat
Subject: Re: [Cs223] Allocating Space for Escaped Characters
Date: Wednesday, 26 Feb 2020, 08:25:28
> Message Posted By: Unknown > > When we malloc new blocks that have size (original string - removed piece > + new piece), does it matter if we include the (- removed piece) portion? > It's relatively straightforward to calculate the removed piece size in > most cases, just escape characters make it more difficult. Is it > worthwhile writing a function to calculate the size of the pieces we are > replacing, or is the slightly larger block size if we ignore the (- > removed piece) insignificant? A slightly larger block size is fine. --Stan-PREV INDEX NEXT