Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Segmentation violation due to MEX code
Date: Mon, 6 Jul 2009 19:52:02 +0000 (UTC)
Organization: Boeing
Lines: 14
Message-ID: <h2tkl2$3jl$1@fred.mathworks.com>
References: <1861877.79321.1246884234900.JavaMail.jakarta@nitrogen.mathforum.org> <28112995.79623.1246887287751.JavaMail.jakarta@nitrogen.mathforum.org>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1246909922 3701 172.30.248.38 (6 Jul 2009 19:52:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 6 Jul 2009 19:52:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 756104
Xref: news.mathworks.com comp.soft-sys.matlab:553197


Jose Antonio <juriguen@gmail.com> wrote in message <28112995.79623.1246887287751.JavaMail.jakarta@nitrogen.mathforum.org>...
> I am pretty sure the problem has to do with memory allocation when calling the function.
> 
> I think so because I have tried to make it work with arrays with up to 4000 values and it performs correctly...
> 
> Any idea if what I say makes sense?
> 
> If so, how can I increase the memory assigned to the MEX function?
> 
> Thanks!

Compiled and ran without seg fault a dozen times with random data using your specified sizes. So I can't reproduce your error. Are all of your inputs double class?

James Tursa