trivial temporary object allocation
Closed this issue · 3 comments
quininer commented
io-uring
needs to allocate many trivial objects for sqe, such as timeout, iovec, sendmsg.
IORING_FEAT_SUBMIT_STABLE
doesn't help us much because we don't submit immediately.
We'd better use an slab allocator for this.
quininer commented
If we use a thread local slab, then we must deal with thread exit, otherwise it may cause UB.
quininer commented
Using thread_local
will break thread safety of future, and I haven't solved idea yet.
quininer commented
We can reuse an object as much as possible. see https://github.com/quininer/ritsu/blob/master/src/action/timeout.rs#L7