zig/lib/std
Ryan Liptak f49d42729a std.ArrayList: add ensureTotalCapacityPrecise and update doc comments
initCapacity did and still does use the ensureTotalCapacityPrecise logic because the initial capacity of an ArrayList is not important in terms of how it grows, so allocating a more exact slice up-front allows for saving memory when the array list never exceeds that initial allocation size. There are use cases where this precise capacity is useful outside of the `init` function, though, like in instances where the user does not call the `init` function themselves but otherwise knows that an ArrayList is empty so calling `ensureTotalCapacityPrecise` can give the same memory savings that `initCapacity` would have.

Closes #9775
2021-11-01 00:57:24 -07:00
..
atomic std.rand: Refactor Random interface 2021-10-27 16:07:48 -04:00
build InstallRawStep: handle empty segments 2021-10-21 17:03:44 -04:00
c std: add missing termios def to std/c/linux.zig 2021-10-30 18:32:26 +02:00
compress Merge pull request #9880 from squeek502/deflate-construct-errors 2021-10-04 15:31:08 -04:00
crypto std.rand: Refactor Random interface 2021-10-27 16:07:48 -04:00
dwarf std: reorganization that allows new usingnamespace semantics 2021-09-01 17:54:06 -07:00
event migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
fmt remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
fs migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
hash std.rand: Refactor Random interface 2021-10-27 16:07:48 -04:00
heap gpa: fix memory limit accounting for large allocations 2021-10-29 19:22:24 -04:00
io std.rand: Refactor Random interface 2021-10-27 16:07:48 -04:00
json remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
math stage2: implement @popCount for non-vectors 2021-10-29 17:49:02 -07:00
mem FIX resize() for non u8 element types. (#9806) 2021-09-22 12:09:16 +03:00
meta Make std.meta.trait.isContainer true for opaques 2021-10-29 20:02:25 +00:00
net migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
os fix(uefi MemoryDescriptor): padding after memory type 2021-10-25 16:43:23 -04:00
rand Add argument for fillFn to Random.init 2021-10-29 19:20:31 -04:00
special Make pointer variables in ( init-lib | init-exe )/build.zig const. (#10057) 2021-10-29 13:37:17 -04:00
target update target CPU features with LLVM 13 rc1 data 2021-08-15 23:09:55 -07:00
testing remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
Thread migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
time add functions to decode an epoch timestamp (#9040) 2021-09-14 19:02:23 +03:00
unicode migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
valgrind remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
x migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
zig parse.zig: report error for extern fn with body 2021-10-26 20:12:28 -04:00
array_hash_map.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
array_list.zig std.ArrayList: add ensureTotalCapacityPrecise and update doc comments 2021-11-01 00:57:24 -07:00
ascii.zig remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
atomic.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
base64.zig remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
bit_set.zig std: disable ArrayBitSet test on aarch64 2021-10-01 22:32:13 -07:00
bounded_array.zig remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
buf_map.zig remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
buf_set.zig remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
build.zig zig: expose linker options and include '-z notext' 2021-10-29 19:18:44 -04:00
builtin.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
c.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
child_process.zig actually fix child process deadlock on windows 2021-10-17 16:07:51 -04:00
coff.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
compress.zig remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
comptime_string_map.zig remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
crypto.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
cstr.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
debug.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
dwarf.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
dynamic_library.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
elf.zig elf: add amd64 relocation types 2021-09-19 14:02:22 +02:00
enums.zig remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
event.zig std, compiler-rt: remove test names where applicable 2021-09-01 17:54:06 -07:00
fifo.zig std.fifo.LinearFifo: ensureUnusedCapacity and ensureTotalCapacity 2021-09-19 13:52:56 +02:00
fmt.zig std: Fix endless loop in fmt impl 2021-10-17 16:06:40 -04:00
fs.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
hash.zig remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
hash_map.zig std.rand: Refactor Random interface 2021-10-27 16:07:48 -04:00
heap.zig stage2: fix inline assembly with expression output 2021-10-20 15:34:10 -07:00
io.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
json.zig Update all ensureCapacity calls to the relevant non-deprecated version 2021-09-19 13:52:56 +02:00
leb128.zig I'm working on a WebAssembly interpreter in zig. WebAssembly uses LEB128 encoding throughout its specification. 2021-09-20 01:58:18 -04:00
linked_list.zig remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
log.zig std.log: simplify to 4 distinct log levels 2021-10-24 15:04:29 -04:00
macho.zig macho: fix allocating sections within segment when parsing objects 2021-08-31 23:05:01 +02:00
math.zig add support for f128 @mulAdd 2021-10-05 12:32:26 -07:00
mem.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
meta.zig Use debug.assert instead of testing.expect. 2021-10-29 20:01:59 +00:00
multi_array_list.zig multi_array_list: get function take self by value 2021-10-26 18:55:02 -04:00
net.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
once.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
os.zig std.os: another workaround for stage1 @minimum behavior 2021-10-15 14:43:57 -07:00
packed_int_array.zig Better documentation, use of len field instead of function, @bitSizeOf instead of meta.bitCout 2021-10-09 03:15:34 -04:00
pdb.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
priority_dequeue.zig std.rand: Refactor Random interface 2021-10-27 16:07:48 -04:00
priority_queue.zig Move compareFn from init to type constructor in PriorityQueue and PriorityDequeue. 2021-10-17 17:47:43 -04:00
process.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
Progress.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
rand.zig Add argument for fillFn to Random.init 2021-10-29 19:20:31 -04:00
SemanticVersion.zig remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
sort.zig std.rand: Refactor Random interface 2021-10-27 16:07:48 -04:00
start.zig Remove reference to stage2_os 2021-09-22 14:14:03 -05:00
start_windows_tls.zig remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
std.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
target.zig freestanding libc: don't rely on compiler_rt symbols we don't have yet 2021-10-05 18:19:31 -07:00
testing.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
Thread.zig Initial bringup of the Solaris/Illumos port 2021-09-24 14:06:16 -04:00
time.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
unicode.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
valgrind.zig zig fmt: respect trailing commas in inline assembly 2021-08-29 11:57:32 +02:00
wasm.zig remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
x.zig remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
zig.zig plan9: change output executable name 2021-09-07 15:08:51 -04:00