Pinned memory optimizations