libqb icon indicating copy to clipboard operation
libqb copied to clipboard

Allow qb_ipcc_event_recv to receive pointer to shm file

Open jfriesse opened this issue 11 years ago • 2 comments

RFE. Current qb_ipcc_event_recv requires caller to pass already allocated buffer. In corosync, we are passing 1M allocated on stack. This makes problems in environments with limited stack size. One solution is to allocate on heap. Even better solution seems to be used in corosync 1.x. Instead of memcpy of buffer from /dev/shm/file to provided preallocated size, it would be nice to have option (probably only for shm based IPC) to get direct pointer to shm file. This would make ipc to not only require additional space but also a little bit faster.

jfriesse avatar Jun 19 '13 14:06 jfriesse

It must be portable across shm/socket. As long as it can do something sensible in the socket case I am ok with that. Else we get to a point where you can't switch to a socket implementation.

asalkeld avatar Jun 19 '13 23:06 asalkeld

@asalkeld : Yes, it's expected to be ether extra call (like dispatch_in_place) where it will return ENOSUP on not supported ipc methods and developer must take care to call standard dispatch OR really do something useful even on unsupported socket.

jfriesse avatar Jun 24 '13 11:06 jfriesse