ndb: ensure profile flatbuffers are not copied
These are pointers into LMDB's virtual memory map of the database. No copy required.
This commit is contained in:
1 parent
0bbc2c6348
commit
984c7b6932
1 file changed
+2
-1
+2
-1
@@ -44,7 +44,8 @@ class Ndb {
|
||||
return nil
|
||||
}
|
||||
|
||||
return NdbProfile(.init(memory: profile_p, count: size), o: 0)
|
||||
let buf = ByteBuffer(assumingMemoryBound: profile_p, capacity: size)
|
||||
return NdbProfile(buf, o: 0)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user