Click here to Skip to main content
16,004,587 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
QuestionHeap stack allocation Pin
trønderen15-Jan-23 13:10
trønderen15-Jan-23 13:10 
AnswerRe: Heap stack allocation Pin
jschell22-Jan-23 9:08
jschell22-Jan-23 9:08 
GeneralRe: Heap stack allocation Pin
trønderen23-Jan-23 4:26
trønderen23-Jan-23 4:26 
GeneralRe: Heap stack allocation Pin
jschell24-Jan-23 10:09
jschell24-Jan-23 10:09 
GeneralRe: Heap stack allocation Pin
jsc4225-Jan-23 1:15
professionaljsc4225-Jan-23 1:15 
GeneralRe: Heap stack allocation Pin
harold aptroot23-Jan-23 1:03
harold aptroot23-Jan-23 1:03 
Branching stacks aka spaghetti stacks are used in the implementations of some functional languages. They work basically how you suggest they could work, plus the added detail of allowing "sibling frames" to exist simultaneously.

Go supposedly used to use segmented/split stacks (which also work roughly as you suggested, not on a per-frame basis exactly but more as a list of blocks), but later apparently switched to just copying the whole damn thing to keep it contiguous (which still leaves "the stack(TM)" as essentially a bunch of arraylists that exist on the heap). Other userspace-threading solutions may use similar techniques for their stacks for "fake threads", but I don't really pay attention to what happens in that space, hell I don't really know what Go is doing either, I just remembered that it did something funny and spent 5 minutes on google to look it up.

By the way, the way stacks normally use, is by reserving a bunch of contiguous virtual address space, and lazily commit pages of actual physical memory only as needed. Which is why large stack allocations involve a call to _chkstk, to ensure that every page is touched in order, to avoid missing the guard page. So already with the stack working the way it normally does, you're probably not paying the full memory cost for each stack. But there is no mechanism to shrink the stack. Once a page has been touched once, you keep it.
GeneralRe: Heap stack allocation Pin
trønderen23-Jan-23 4:46
trønderen23-Jan-23 4:46 
GeneralRe: Heap stack allocation Pin
jschell24-Jan-23 10:12
jschell24-Jan-23 10:12 
QuestionSetting Up Client Test Environments Pin
Kevin Marois28-Dec-22 9:48
professionalKevin Marois28-Dec-22 9:48 
AnswerRe: Setting Up Client Test Environments Pin
jschell17-Jan-23 4:34
jschell17-Jan-23 4:34 
AnswerRe: Setting Up Client Test Environments Pin
jochance7-Mar-23 19:23
jochance7-Mar-23 19:23 
QuestionHas x:bind in WinUI 3 effectively killed commanding and converters? Pin
greatoceansoftware23-Dec-22 5:53
greatoceansoftware23-Dec-22 5:53 
AnswerRe: Has x:bind in WinUI 3 effectively killed commanding and converters? Pin
Gerry Schmitz28-Dec-22 16:24
mveGerry Schmitz28-Dec-22 16:24 
GeneralRe: Has x:bind in WinUI 3 effectively killed commanding and converters? Pin
greatoceansoftware29-Dec-22 14:56
greatoceansoftware29-Dec-22 14:56 
QuestionImplementing Google Contacts in WPF App Pin
Kevin Marois13-Dec-22 6:31
professionalKevin Marois13-Dec-22 6:31 
AnswerRe: Implementing Google Contacts in WPF App Pin
Gerry Schmitz14-Dec-22 9:08
mveGerry Schmitz14-Dec-22 9:08 
GeneralRe: Implementing Google Contacts in WPF App Pin
Kevin Marois14-Dec-22 10:22
professionalKevin Marois14-Dec-22 10:22 
GeneralRe: Implementing Google Contacts in WPF App Pin
Gerry Schmitz15-Dec-22 8:07
mveGerry Schmitz15-Dec-22 8:07 
GeneralRe: Implementing Google Contacts in WPF App Pin
Kevin Marois15-Dec-22 12:27
professionalKevin Marois15-Dec-22 12:27 
GeneralRe: Implementing Google Contacts in WPF App Pin
Gerry Schmitz15-Dec-22 16:30
mveGerry Schmitz15-Dec-22 16:30 
GeneralRe: Implementing Google Contacts in WPF App Pin
Kevin Marois15-Dec-22 18:15
professionalKevin Marois15-Dec-22 18:15 
GeneralRe: Implementing Google Contacts in WPF App Pin
Gerry Schmitz16-Dec-22 2:06
mveGerry Schmitz16-Dec-22 2:06 
AnswerRe: Implementing Google Contacts in WPF App Pin
jschell20-Dec-22 13:34
jschell20-Dec-22 13:34 
QuestionI have a really strange problem with WebRequest in a ServiceStack web application (hosted by XSP on Mono). It seems that the registration of request modules works in a very strange way; I am using WebRequest to create an HTTP request, and it is faili Pin
Isaac Tack12-Dec-22 1:20
Isaac Tack12-Dec-22 1:20 
AnswerRe: JWT vs Redis - to improve the performance of my application Pin
jschell13-Dec-22 10:42
jschell13-Dec-22 10:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.