HomePhorge

(PUP-3837) Allocate smaller registry value buffers
cfe1a7b73669Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(PUP-3837) Allocate smaller registry value buffers

  • Previously, a 32k character buffer would be allocated up front for each registry value read through RegEnumValueW. This is a very wasteful operation when using UTF-16LE as this allocates 64k memory per read, which could be 1000x more memory than necessary per read. Instead use the RegQueryInfoKey API call, which requires only 2 DWORD allocations up front to store the maximum size values, that can be used when calling RegEnumKeyW and RegEnumValueW.

Details

Provenance
Ethan J. Brown <Iristyle@github>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUb46ede74f640: (PUP-3837) FFI Registry access code
Branches
Unknown
Tags
Unknown

Event Timeline

Ethan J. Brown <Iristyle@github> committed rPUcfe1a7b73669: (PUP-3837) Allocate smaller registry value buffers (authored by Ethan J. Brown <Iristyle@github>).Feb 3 2015, 8:04 AM