www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/11/23/00:43:59

From: wrh AT placer1 DOT wimsey DOT com (William Hughes)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: stack space goes boink
Reply-To: wrh AT placer1 DOT wimsey DOT com
Date: Tue, 22 Nov 94 16:18:57 PST

Hello all, 

I have an application that uses a tree to store three-D points.
Anyway, I didn't bother about balancing the tree because the data
is mostly random in its presentation, however, I just got a phone
call from a fellow who had a bunch of sort of sorted data.  The tree
uses a recursive routine to insert the data.  He got a null pointer
error (my diagnostic routine, the insert function checks its arguments)
after having inserted almost all of his mostly sorted points.

So, as far as I can tell, the stack ran into something and whacked the
recursive insert functions' argument.  How does the stack work in djgpp 
go32 programs?  Can I set it to have more room?  I know how this
works in a DOS world, but I am a little queasy about djgpp.  I have 1.11m5.

btw, I can balance off the tree after 'X' memory is used anyway, but can
I check to see how much stack space is left?  Can I give it more room for
more recursion on the fly?  Am I just bibbling about stuff I know nothing
about?

I would much rather just set the stack really really big and not write 
any code that goes and tries to balance binary trees that were allocated 
using a function I wrote over FIVE YEARS AGO.  Ick.

Precariously

William






- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019