C struct swap malloc test