Skip to content

exit() on OOM #3

Closed
Closed
@minaguib

Description

@minaguib

Hi

In a few places, if hiredis gets out of memory, it calls exit()

This is unlikely, however since hiredis is a library, I'd like it if program control is dictated by the caller.

I think functions that OOM should just return failure to the user. Alternatively, the user at init time can supply a pointer to his own OOM function to be called.

I'd prefer the first approach, and don't mind implementing it if all's in consensus.

Thoughts welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions