Skip to content

2D array allocation incorrect #15

Description

@Robadob

sizeof(matrix_type) being used instead of sizeof(matrix_type*) in Lab3 Ex1 src and sln

a = (matrixNN)malloc(sizeof(matrix_type)*N);

b = (matrixNN)malloc(sizeof(matrix_type)*N);

c = (matrixNN)malloc(sizeof(matrix_type)*N);

a = (matrixNN)malloc(sizeof(matrix_type)*N);

b = (matrixNN)malloc(sizeof(matrix_type)*N);

c = (matrixNN)malloc(sizeof(matrix_type)*N);

Noticed by a student on the mailing list 2022-04-23.
Not actually harmful in this instance as matrix_type maps to double, so the size matches.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions