Linux-HA Logo

Heartbeat Open Issues

This page is formatted and updated according to the IssueTrackingWikiProtocol[1].

issue id

Summary: Memory allocation unification

Created by: -- Lars Marowsky-Brée 2004-03-02 05:01:02

LarsEllenberg[2] asked on the linux-ha-dev mailing list how the memory allocation should be done inside heartbeat code, seeking a clarification of the rules. He points out that

  • that MALLOC is defined in every other C file, and not in some common header file and that the corresponding CALLOC and REALLOC are not defined anywhere,

  • that MALLOC or even malloc() is sometimes used directly, instead of the g_new function.

    The question boils down to: what is the preferred way of allocating memory in heartbeat - MALLOC, malloc, cl_malloc, g_new?

    LarsMarowskyBree[3] agrees this is highly confusing, probably due to historical reasons, and a clarification of the rules and a cleanup of the legacy code is definetely needed. I think cl_malloc() should have the best chances.


  • CategoryIssue[4], CategoryOpenIssue[5]

    issue id

    Summary: cl_logging daemon needs fixing

    Created by: -- Lars Marowsky-Brée 2004-03-02 05:11:17

    The cl_log code calls syslog(), which is about the last place in the core where we can block and kill our realtime performance.

    LarsEllenberg[2] points out that the cl_log logging daemon is not implemented at all. He proposed to implement a double buffering scheme with a pre-allocated ring buffer. Using the non-blocking IPC code, this should solve the issue.

    LarsMarowskyBree[3] says to go ahead - it would be nice if this single logging daemon was automatically used by all applications signing in with heartbeat or the crmd, ie if the logging daemon was shared among all cl_log() users.


    CategoryIssue[4], CategoryOpenIssue[5]

    See also

    HeartbeatResolvedIssues[6], IssueTrackingWikiProtocol[1].


    References

    [1]http://www.linux-ha.org/IssueTrackingWikiProtocol
    [2]http://www.linux-ha.org/LarsEllenberg
    [3]http://www.linux-ha.org/LarsMarowskyBree
    [4]http://www.linux-ha.org/CategoryIssue
    [5]http://www.linux-ha.org/CategoryOpenIssue
    [6]http://www.linux-ha.org/HeartbeatResolvedIssues


    This information provided courtesy of the Linux-HA project at http://linux-ha.org/