Updating findFreeSpace() to remove unneeded memcpy operations to stack variables