LLVMJIT: Fix memory leak
We were calling `new MemoryMapper` and passing it into the `llvm::SectionMemoryManager`, but the `SectionMemoryManager` does not take ownership, resulting in a leak.
Given that the `MemoryMapper` is entirely stateless, just use a pointer to a single static instance.
Bug: b/171402030
Change-Id: Ic3a118a5f4aeea6b6b60861399993e81827c9d48
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/49488Reviewed-by:
Antonio Maiorano <amaiorano@google.com>
Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Tested-by:
Ben Clayton <bclayton@google.com>
Showing
Please
register
or
sign in
to comment