mirror of
git://jb55.com/damus
synced 2024-09-19 11:43:44 +00:00
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:
parent
0bbc2c6348
commit
984c7b6932
@ -44,7 +44,8 @@ class Ndb {
|
|||||||
return nil
|
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user