You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since Valgrind shadows memory eagerly, it blows up when we allocate a large MAP_NORESERVE region, because it tries to eagerly shadow it.
For a long time, we used memtables everywhere and I could not see a reasonable fix. But now we don't use them much... the pageindex is our only huge unreserved mapping.
I had long thought about a special "Valgrind build" that uses a different data structure for the pageindex. However, probably something simpler and cleaner will suffice: map the pageindex lazily. We can install a SIGSEGV handler and do that (and/or how slow would an ensure_mapped() call be at pageindex manipulations?). It works only because we explicitly place all mappings, so we can ensure we never map something else in a place where we may later need to map the pageindex.
The text was updated successfully, but these errors were encountered:
Having said that, Valgrind itself tries to own the memory map and so we may have a tussle on our hands. Someone needs to try this... probably me, for now.
Since Valgrind shadows memory eagerly, it blows up when we allocate a large
MAP_NORESERVE
region, because it tries to eagerly shadow it.For a long time, we used memtables everywhere and I could not see a reasonable fix. But now we don't use them much... the pageindex is our only huge unreserved mapping.
I had long thought about a special "Valgrind build" that uses a different data structure for the pageindex. However, probably something simpler and cleaner will suffice: map the pageindex lazily. We can install a
SIGSEGV
handler and do that (and/or how slow would anensure_mapped()
call be at pageindex manipulations?). It works only because we explicitly place all mappings, so we can ensure we never map something else in a place where we may later need to map the pageindex.The text was updated successfully, but these errors were encountered: