Mem: Allow serializing of more than INT_MAX bytes
Mem: Allow serializing of more than INT_MAX bytes

Despite gzwrite taking an unsigned for length, it returns an int for
bytes written; gzwrite fails if (int)len < 0.  Because of this, call
gzwrite with len no larger than INT_MAX: write in blocks of INT_MAX if
data to be written is larger than INT_MAX.

TUD-OS/gem5-dtu,SanchayanMaity/gem5,kaiyuanl/gem5,joerocklin/gem5,SanchayanMaity/gem5,kaiyuanl/gem5,zlfben/gem5,yb-kim/gemV,SanchayanMaity/gem5,cancro7/gem5,gedare/gem5,samueldotj/TeeRISC-Simulator,austinharris/gem5-riscv,zlfben/gem5,HwisooSo/gemV-update,briancoutinho0905/2dsampling,rallylee/gem5,rallylee/gem5,qizenguf/MLC-STT,HwisooSo/gemV-update,yb-kim/gemV,kaiyuanl/gem5,rjschof/gem5,rjschof/gem5,briancoutinho0905/2dsampling,SanchayanMaity/gem5,Weil0ng/gem5,powerjg/gem5-ci-test,SanchayanMaity/gem5,joerocklin/gem5,zlfben/gem5,briancoutinho0905/2dsampling,gedare/gem5,powerjg/gem5-ci-test,samueldotj/TeeRISC-Simulator,SanchayanMaity/gem5,sobercoder/gem5,cancro7/gem5,samueldotj/TeeRISC-Simulator,cancro7/gem5,rjschof/gem5,markoshorro/gem5,samueldotj/TeeRISC-Simulator,yb-kim/gemV,rjschof/gem5,powerjg/gem5-ci-test,austinharris/gem5-riscv,kaiyuanl/gem5,joerocklin/gem5,cancro7/gem5,HwisooSo/gemV-update,aclifton/cpeg853-gem5,zlfben/gem5,briancoutinho0905/2dsampling,zlfben/gem5,austinharris/gem5-riscv,gem5/gem5,markoshorro/gem5,rjschof/gem5,samueldotj/TeeRISC-Simulator,gedare/gem5,TUD-OS/gem5-dtu,sobercoder/gem5,cancro7/gem5,qizenguf/MLC-STT,rjschof/gem5,rallylee/gem5,KuroeKurose/gem5,aclifton/cpeg853-gem5,powerjg/gem5-ci-test,qizenguf/MLC-STT,aclifton/cpeg853-gem5,yb-kim/gemV,HwisooSo/gemV-update,austinharris/gem5-riscv,TUD-OS/gem5-dtu,austinharris/gem5-riscv,rallylee/gem5,Weil0ng/gem5,TUD-OS/gem5-dtu,Weil0ng/gem5,rallylee/gem5,kaiyuanl/gem5,TUD-OS/gem5-dtu,qizenguf/MLC-STT,joerocklin/gem5,gem5/gem5,gedare/gem5,sobercoder/gem5,KuroeKurose/gem5,aclifton/cpeg853-gem5,KuroeKurose/gem5,joerocklin/gem5,joerocklin/gem5,sobercoder/gem5,zlfben/gem5,HwisooSo/gemV-update,sobercoder/gem5,yb-kim/gemV,markoshorro/gem5,gedare/gem5,kaiyuanl/gem5,gedare/gem5,aclifton/cpeg853-gem5,sobercoder/gem5,briancoutinho0905/2dsampling,rallylee/gem5,TUD-OS/gem5-dtu,rallylee/gem5,KuroeKurose/gem5,markoshorro/gem5,briancoutinho0905/2dsampling,yb-kim/gemV,Weil0ng/gem5,yb-kim/gemV,SanchayanMaity/gem5,austinharris/gem5-riscv,gem5/gem5,austinharris/gem5-riscv,powerjg/gem5-ci-test,Weil0ng/gem5,markoshorro/gem5,joerocklin/gem5,gedare/gem5,briancoutinho0905/2dsampling,samueldotj/TeeRISC-Simulator,TUD-OS/gem5-dtu,cancro7/gem5,markoshorro/gem5,gem5/gem5,gem5/gem5,markoshorro/gem5,HwisooSo/gemV-update,qizenguf/MLC-STT,powerjg/gem5-ci-test,aclifton/cpeg853-gem5,kaiyuanl/gem5,KuroeKurose/gem5,qizenguf/MLC-STT,rjschof/gem5,KuroeKurose/gem5,cancro7/gem5,sobercoder/gem5,Weil0ng/gem5,Weil0ng/gem5,samueldotj/TeeRISC-Simulator,HwisooSo/gemV-update,aclifton/cpeg853-gem5,powerjg/gem5-ci-test,qizenguf/MLC-STT,joerocklin/gem5,KuroeKurose/gem5,zlfben/gem5,yb-kim/gemV,gem5/gem5,gem5/gem5