Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Planet Search Overhaul (07/13/24)

Author Topic: Xss?  (Read 4751 times)

FireBlitz8404

  • Ensign
  • *
  • Posts: 24
    • View Profile
Xss?
« on: December 10, 2020, 06:13:24 PM »

What does Xss number account for in the vmparams?
I know the Xms & Xmx are the RAM allotment.
I think I remember something about the Xss being for video memory or something.
Can anyone explain it better?
Logged

MesoTroniK

  • Admiral
  • *****
  • Posts: 1734
  • I am going to destroy your ships
    • View Profile
Re: Xss?
« Reply #1 on: December 10, 2020, 07:50:23 PM »

Xss is stack size, and in 99.9% of cases you should never change it.

It has nothing to do with vram allocation, that is totally automatic determined by the video card driver and hardware present.

FireBlitz8404

  • Ensign
  • *
  • Posts: 24
    • View Profile
Re: Xss?
« Reply #2 on: December 11, 2020, 10:55:04 AM »

welp
« Last Edit: December 11, 2020, 10:56:57 AM by FireBlitz8404 »
Logged

FireBlitz8404

  • Ensign
  • *
  • Posts: 24
    • View Profile
Re: Xss?
« Reply #3 on: December 11, 2020, 10:56:20 AM »

Xss is stack size, and in 99.9% of cases you should never change it.

It has nothing to do with vram allocation, that is totally automatic determined by the video card driver and hardware present.

Thank you.
I did search it up in the forums and found a few people with different values than the number I have.
Any idea why that is ?
Logged

Wispborne

  • Captain
  • ****
  • Posts: 469
  • Discord: wispborne
    • View Profile
Re: Xss?
« Reply #4 on: December 13, 2020, 11:21:58 AM »

Xss is stack size, and in 99.9% of cases you should never change it.

It has nothing to do with vram allocation, that is totally automatic determined by the video card driver and hardware present.

Thank you.
I did search it up in the forums and found a few people with different values than the number I have.
Any idea why that is ?

They've changed it manually most likely, or perhaps older versions of Starsector used a different number.

The reason you'd want to change it is when your game crashed with a StackOverflowException and you don't think it was caused by a buggy mod. If the savegame has things nested sufficiently deeply, it can cause a stack overflow when reading/writing.

I wrote up a description of xss a few months ago:

Quote
You know Inception, where they go into a dream from a dream from a dream?
That concept is common in programming; you call/invoke functions from other functions, which puts the calling function on pause until the "inner" one finishes
Stack size is how many layers deep you can go
In Inception, they went what, 3 layers deep?
Xss is the max limit, and if it goes over that limit, you get a StackOverflowException
and that's why increasing the limit fixed it
The limit exists because most of the time, when a program goes over the limit, it's because there's a mistake in the code, eg function A invokes function B, which invokes function A, which invokes function B, which invokes function A, which invokes function B.....etc. It's an infinite loop.
And since you don't want that runaway code to eat tons of resources, a "reasonable limit" is put on it; the stack size (xss).
Logged
Mod Managers: TriOS & SMOL | Mod: Persean Chronicles | Tool: VRAM Estimator | Tool: Forum+Discord Mod Database | If I'm inactive for 3 months, anyone can use any of my work for anything (except selling it or its derivatives).