Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mad speculation: preallocating synthetic reply messages #67

Open
GoogleCodeExporter opened this issue Mar 17, 2015 · 0 comments
Open

Mad speculation: preallocating synthetic reply messages #67

GoogleCodeExporter opened this issue Mar 17, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

KBUS has various places where it is a very Bad Thing to fail a malloc. Some of 
them are in the generation of synthetic messages, which are generally used to 
send a "reply not going to happen" sort of message.

We really really want to be able to guarantee such messages will happen.

Two thoughts occur:

1. Since synthetic messages use a few predetermined message names, maybe we 
shouldn't copy those names, but should instead just use a reference to the 
static name. Of course, we'd have to note that and not free them.
2. Most synthetic messages don't have any data. Let's ignore the ones that do.
3. Maybe when a sender sends a request, as well as pre-allocating room on the 
sender's message queue for the reply, we should also pre-allocate a synthetic 
message, in case it is needed. Then we coudn't run out of malloc-space when we 
do need one. See, I said it was mad. Seriously, this is a fair overhead to add 
to any request sent, but it might be worth looking into.

Original issue reported on code.google.com by [email protected] on 7 Aug 2011 at 5:06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant