Prev: Random phases using chaos model
Next: Curve fitting MIMO grey-box model using pem and freq. data
From: Shota on 2 May 2010 18:58 Hi, I have a small MEX file written in C. In side, there is a for loop, and in each iteration the for loop, I allocate a very small amount of memory by doing calloc(6, sizeof(int)) However, in the 9th iteration, calloc already fails, which is impossible, and I'm pretty sure MATLAB can allocate a lot more memory from heap. I even freed the unused memory at the end of each iteration, but still the same thing happens. I greatly appreciate your help.
From: James Tursa on 2 May 2010 19:47 "Shota " <shotaemail(a)gmail.com> wrote in message <hrl01t$r7a$1(a)fred.mathworks.com>... > Hi, > > I have a small MEX file written in C. In side, there is a for loop, and in each iteration the for loop, I allocate a very small amount of memory by doing calloc(6, sizeof(int)) > > However, in the 9th iteration, calloc already fails, which is impossible, and I'm pretty sure MATLAB can allocate a lot more memory from heap. > > I even freed the unused memory at the end of each iteration, but still the same thing happens. I greatly appreciate your help. Can't give you any help unless you post your code. Also, what do you mean by "fails"? James Tursa
|
Pages: 1 Prev: Random phases using chaos model Next: Curve fitting MIMO grey-box model using pem and freq. data |