Skip to content

Commit 75e8876

Browse files
committed
Adding extra output to the error message from checkedCalloc.
1 parent 64944a8 commit 75e8876

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ArrayOperations.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ void* checkedCalloc(size_t vectorLength, size_t sizeOfType) {
2626
/* This call returns control to Matlab, with the associated error message */
2727
mexErrMsgTxt("Failed to allocate memory\n");
2828
#elif defined(C_IMPLEMENTATION)
29-
fprintf(stderr, "Error: %s\n", strerror(errno));
29+
fprintf(stderr, "Error: %s\nAttempted to allocate %lu length of size %lu\n", strerror(errno), vectorLength, sizeOfType);
3030
exit(EXIT_FAILURE);
3131
#endif
3232
}

0 commit comments

Comments
 (0)