Rob
On Friday, 21 February 2014 09:34:04 UTC-8, Aram Hăvărneanu wrote:
The goroutine stack size is 8kB now, not 4kB as before. This means
that each stack uses 8kB of address space. Most goroutines still
only use 4kB of physical memory though. The operating system will
only map the second page when it faults as the user (code) tries
to access it the first time.
On a potential SPARC, goroutines would probably start with 8kB
stacks which would use 8k of physical memory, as the page size is
8kB. There's no requirement that stack size be a multiple of page
size, however, it can be smaller. The operating system will map
memory in page-size increments, but the Go memory allocator can
allocate space for stacks of any size.
It's no different than amd64 2MB pages. A single 2MB page can back
many stack segments; stack segments can be very small.
--
Aram Hăvărneanu
--The goroutine stack size is 8kB now, not 4kB as before. This means
that each stack uses 8kB of address space. Most goroutines still
only use 4kB of physical memory though. The operating system will
only map the second page when it faults as the user (code) tries
to access it the first time.
On a potential SPARC, goroutines would probably start with 8kB
stacks which would use 8k of physical memory, as the page size is
8kB. There's no requirement that stack size be a multiple of page
size, however, it can be smaller. The operating system will map
memory in page-size increments, but the Go memory allocator can
allocate space for stacks of any size.
It's no different than amd64 2MB pages. A single 2MB page can back
many stack segments; stack segments can be very small.
--
Aram Hăvărneanu
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.