diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2024-04-24 13:33:51 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2024-05-06 14:32:55 -0700 |
commit | 4a984c15dde72e074b2d66e484387cbe0d53130d (patch) | |
tree | 37fe2981193bc6ddb31fd30a565ec44518cda36d /src/gui/kernel/qplatforminputcontext_p.h | |
parent | 1b64b7c672a63d4221d7c6fd6f5a77e77979a6c6 (diff) |
QResource: add support for duplicating mapped memory on macOS
Similar to the Linux solution, this avoids allocating heap memory in the
implementation of QFile::map() calls with MapPrivateOption.
Unlike the Linux solution, the macOS one cannot duplicate resources
present in read-only sections of binaries, only those loaded from files
with mmap() (QResource::registerResource()), because the max_prot
setting on the source does not have the VM_PROT_WRITE bit set and I
could not find a way to reset it to force a copy-on-write.
Change-Id: I6979d02a7395405cbf23fffd17c951949c71ec20
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/gui/kernel/qplatforminputcontext_p.h')
0 files changed, 0 insertions, 0 deletions