PREV INDEX NEXT

Author: Unknown
Subject: Allocating Space for Escaped Characters
Date: Wednesday, 26 Feb 2020, 04:07:29

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?
PREV INDEX NEXT