forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Configuring SLINK64

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 5968
Location: Salford, UK

PostPosted: Fri Jul 26, 2019 4:44 pm    Post subject: Configuring SLINK64 Reply with quote

The default stack size provided by SLINK64 is currently 32MB. This default can be changed by using the commands stack_size=val or stack=val but some users may prefer the simplicity of having a larger default value.

This stack size is the value that SLINK64 inserts into the PE header (as MasterHeader->OptionalHeader.SizeOfStackReserve) when building your executable or DLL.

A new version of SLINK64 can be downloaded via the link below and this comes with a file called Slink64.ini that is to be placed alongside Slink64.exe in your Silverfrost FTN95 folder. The ini file initially contains a value of 1024 that represents a default stack size of 1GB. Likewise a value of 32 replicates the current default which is the minimum that SLINK64 currently permits. This value can be changed at will. My tests so far seem to show no degradation when an unnecessarily large reserve stack size is used.

If users find this feature to be useful then we could later add a "config" option to SLINK64 (similar to that in FTN95) that avoids the direct editing of the ini file.

Note that the ini file usually resides in a protected folder so direct editing of the file is normally not possible. Simply edit the file before copying it to your protected folder.

Here is the link...
https://www.dropbox.com/s/umxj1h3usdd534y/Slink64.zip?dl=0
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 1997
Location: South Pole, Antarctica

PostPosted: Sun Aug 04, 2019 12:24 pm    Post subject: Re: Configuring SLINK64 Reply with quote

PaulLaidler wrote:
My tests so far seem to show no degradation when an unnecessarily large reserve stack size is used.


I am still confused how it works as i always was since 32bit. For example i can compile and run program allocating in stack local array 1.5GB in size with just default stack which was told is only minuscule 32 MB. And what means unnecessary large? Can you provide an example of stack larger than say 3GB?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 5968
Location: Salford, UK

PostPosted: Sun Aug 04, 2019 11:25 pm    Post subject: Reply with quote

I will look into this again and aim to give a more complete explanation but it could be a little while before I get back to you on this.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 5968
Location: Salford, UK

PostPosted: Tue Aug 20, 2019 3:15 pm    Post subject: Reply with quote

Here is an update regarding the maximum size of the FTN95 stack.

In the announcements for the release of v8.50 of FTN95 it was stated that

Quote:
The size of the FTN95 stack is effectively no longer limited.


This turns out to be incorrect. The code for this change (within SLINK64) was in place but was not activated at a certain critical point.

We apologise for this oversight and will aim to have this implemented in the next full release. This will allow for a much larger stack size (above the 4GB limit) but the maximum size will still not be unlimited.

A large stack size is (perhaps only) required when using very large local arrays within subroutines.

For those are interested in the details, SLINK64 uses the stack size to set a value within the PE header of the resulting executable and this value is currently implemented correctly. However, SLINK64 also uses this value within some introductory code that it inserts as a prefix before the users code in the executable. It is this part that for the moment remains disabled.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group