Updated patch: this version fixes some missed cases of malloc in the realloc implementation. It also reworks the unused variable workarounds so that the work better with my reworked pinned memory patches I've not posted yet. Andrew