flat assembler
Message board for the users of flat assembler.
Index
> Main > Challenge: find out what this excellent code is ... |
Author |
|
revolution 19 Feb 2012, 08:31
It appears not to be x86 code.
What is pope? What is movntq? Anyhow, looks to be a simple stack toucher. Why is this challenge? Couldn't you figure it out or something? |
|||
19 Feb 2012, 08:31 |
|
DOS386 19 Feb 2012, 08:33
> looks to be a simple stack toucher
What's the goal of doing ? It crashes if stack (reserve/commit) is too small |
|||
19 Feb 2012, 08:33 |
|
revolution 19 Feb 2012, 09:24
Stack touchers are meant to trigger the guard page to commit more stack. If it crashes because of insufficient reserve then reserve more, stack touchers are not meant to solve reservation problems.
|
|||
19 Feb 2012, 09:24 |
|
Tyler 20 Feb 2012, 03:25
Why would one want to cause the operating system to commit more stack? That is, why not just let it happen as needed?
|
|||
20 Feb 2012, 03:25 |
|
revolution 20 Feb 2012, 03:28
Tyler wrote: Why would one want to cause the operating system to commit more stack? That is, why not just let it happen as needed? |
|||
20 Feb 2012, 03:28 |
|
DOS386 20 Feb 2012, 03:52
So the HLL compiler generated code calls this "toucher" whenever it has to hog > 4 KiB of stack for placing local variables?
It's not a big problem to increase the stack reserve, anyway |
|||
20 Feb 2012, 03:52 |
|
Tyler 22 Feb 2012, 04:56
revolution wrote:
Maybe a better solution that would eliminate the need for a stack toucher could be to map the remainder of the maximum stack size as not present but with a value in the rest of the PTE that tells the kernel the page is part of a stack. When a page fault is generated for a page that is marked as a stack page, the kernel could allocate all the pages between the top of the stack and the page that caused the fault. This would be optimal, because it wastes no physical memory (same as guard page), wastes the same amount of virtual memory (address space) as the guard page method must reserve, and is more efficient in increasing the stack for large increases. Anyway, I don't want to get too far off topic. Thanks for the explanation. |
|||
22 Feb 2012, 04:56 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.