Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Private Variable

main_thread_area_buffer

Private Variable
std.os.linux.tls.main_thread_area_buffer
var main_thread_area_buffer: [0x1000]u8 align(page_size_min) = undefined

The main motivation for the size chosen here is to be larger than total amount of thread-local variables for most programs. Putting this allocation in the ELF like this is equivalent to moving the mmap call below into the kernel, avoiding syscall overhead.

File

os/linux/tls.zig:650
650
var main_thread_area_buffer: [0x1000]u8 align(page_size_min) = undefined