[Lldb-commits] [PATCH] D74660: WIP: [lldb/FileSystem] Add & use CreateReadonlyDataBuffer where possible

Vedant Kumar via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 17 16:25:19 PST 2020


vsk planned changes to this revision.
vsk added a comment.

@labath thank you for your comments. I'm not yet sure what explains the average size of the WritableMemoryBuffer's allocated on our users' machines (~ 187,918 bytes, comfortably larger than the 16K threshold in `shouldUseMmap`). I'll need to figure this out before going any further.

I did expect `openFileAux` to always malloc() when constructing a WritableMemoryBuffer, forgetting that a MAP_PRIVATE mapping would also work. Generally, on Darwin (& probably elsewhere) we want to use MAP_PRIVATE mappings as much as possible, as these do not need to get written to swap space or stashed in the VM compressor.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74660/new/

https://reviews.llvm.org/D74660





More information about the lldb-commits mailing list