Skip to content

Change allocation strategy of the distance matrix to avoid overcommit #2

Open
@r4victor

Description

@r4victor

The DTWBD() function that performs sequence alignment allocates the whole distance matrix at once. This allocation may request a lot of memory. On Linux and Mac OS this is not a problem because they overcommit:

Overcommit refers to the practice of giving out virtual memory with no guarantee that physical storage for it exists).

And in practice, when the matrix is large, only elements in window are actually used. Windows simply won't allocate memory and return NULL. This caused some bugs before (Issue 1).

The solution is to change the code so that only elements in window are allocated. Like this, for example.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions