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

Remove useless OOM handling #13

Closed
silvioprog opened this issue Feb 1, 2019 · 0 comments
Closed

Remove useless OOM handling #13

silvioprog opened this issue Feb 1, 2019 · 0 comments
Assignees

Comments

@silvioprog
Copy link
Member

Hello,

there are some points which handles OOM in a pessimist way, for example: src/sg_httpres.c#L153.

Such handling should be replaced by something like this:

...
    if (!(res->handle = MHD_create_response_from_buffer(size, buf, MHD_RESPMEM_MUST_COPY)))
        return ENOMEM;
...

so the programmer has a chance to decide how the OOM will be handled at run time. (it is already possible at build time by replacing the oom() macro too)

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