[vox-tech] cygwin - segfault on array allocation

Peter Jay Salzman p at dirac.org
Wed Feb 8 13:34:25 PST 2006


On Wed 08 Feb 06, 12:13 PM, Daniel A. Lorca-Martinez <lorca at pobox.com> said:
> 
> That's a big red flag.  Anyway, have you tried manuually putting
> 
> 	double a[50761]; // also for b, c, d, e
> 
> and/or
> 
> 	int a[50761]; // also for b, c, d, e
> 
> alternatively,
> 
> 	double a[50761] // also for b, c, d, but NOT e
> 
> if you're feeling particularly adventurous and can do your own 
> garbage collection:
> 
> 	double *a, *b, *c, *d, *e;
> 	a = (double*)malloc(sizeof(double)*strtol(...)); // also for b, c, 
> 	d, e
> 
> All these would help decide if you're really just busting through a 2 
> meg limit on cygwin or not.

Yeah, actually matt's suggestion worked.  I used:

   double *d = new double[N];

to allocate my arrays and it worked fine.  I never bumped against a stack
size limit before.  the stack size limit as reported by ulimit is 2MB.  That
seems pretty restrictive.

> Sorry if I'm being basic Pete, just tossing out ideas here.  By the 
> way, congrats on the job, Norm mentioned you had been looking (unless 
> I'm confusing you with someone else, in which case, well, my bad!).
 
No problemo.  My only concern is to learn and become better.  Everything is
appreciated graciously.

Yeah, that's me.  Working on Wall street is a gas.  Last night I got drop
dead drunk doing shots at Fraunce's Tavern (where George Washington said
farewell to his officers) with a friend and a CTO of a major financial
software firm.  Turns out the guy is a Davis native (!) and a fellow
physicist.  He went the equities route, and as for right now, I seem to be
headed for fixed income.

I have to say, I always felt for the talented people on this list who were
out of work, but in retrospect, I never really understood just how
demoralizing it really is until it happened to me.

Pete


More information about the vox-tech mailing list