Re: Minimum Stack Size

Jay Michael <[email protected]>
Newsgroups gmane.comp.compilers.gpc
Message-ID <[email protected]>
--------------------------------------------
On Thu, 7/25/13, Kevan Hashemi <[email protected]> wrote:

 Subject: Minimum Stack Size
 To: "[email protected]" <[email protected]>
 Date: Thursday, July 25, 2013, 4:47 PM
 
 Dear GPC Users,
 
 I'm trying to force the operating system to give my Pascal
 code a 2-MByte stack so I can solve a problem with a
 recursive routine. I have tried:
 
 const {for recursive routines}
     minstacksize: cardinal = 2000000; attribute
 (name = '_stklen');
 
 But that does not appear to work. Perhaps I am not trying
 hard enough. Am I on the right track?
 
 Yours, Kevan
 
 -- Kevan Hashemi, Electrical Engineer
 Physics Department, Brandeis University
 http://alignment.hep.brandeis.edu/
 
 
     What you describe doing, I found in a FAQ, but the paragraphs around it mentioned DJGPP.  I'm not clear on what DJGPP is, or whether you're using it.  (I think I'm not using it -- I'm using MinGW.)

     The same place mentions using a program named "stubedit" to set the stack size:
          stubedit your_app.exe minstack=5000K
Do you have a "stubedit"?

     In doc/gpc/gpcc.txt there's mention of an option (switch?):
          Stack size: -$M<StackSize>

     "ld" has an option:
          --stack <size>
     I think you can get that through to "ld" by putting
          -Xlinker --stack=2000000
on your "gpc" command.

     I don't see "stklen" in my map file, but I wonder whether you need more or fewer underscores.
(Maybe "attribute(name=) used to "help" you by prepending an underscore, but has since been changed to do exactly what you tell it to do.)

     I haven't tried any of these things.

 

_______________________________________________
Gpc mailing list
[email protected]
https://www.g-n-u.de/mailman/listinfo/gpc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.