by GreggChandler » Sat Jun 10, 2017 3:57 am
I did not spend too much time reading your code, but noticed that in file e_task1.c, function getmat(), you return a pointer to a variable allocated on the stack within function getmat(). That is not going to be reliable 'C' code. While you could return a pointer to a "static" variable allocated within your function, that is only because "static" variables are not allocated on the stack. With the variable declared "static" all invocations of the function would share a single allocated variable. This is really not so much an issue with the Parallella, but rather an issue with the 'C' programming language.