diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-02-12 02:27:02 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-02-12 02:44:31 -0500 |
| commit | 4a4ea92cf38372dc63184957e2936fa7989743fb (patch) | |
| tree | 94866dbdde8065d23016ed23f2dc09af18ed85da /std/os | |
| parent | 445b03384a5ffcace11927aa9dd5f21604527f5c (diff) | |
| download | zig-4a4ea92cf38372dc63184957e2936fa7989743fb.tar.gz zig-4a4ea92cf38372dc63184957e2936fa7989743fb.zip | |
remove std.heap.IncrementingAllocator
Use std.heap.FixedBufferAllocator combined with
std.heap.DirectAllocator instead.
std.mem.FixedBufferAllocator is moved to std.heap.FixedBufferAllocator
Diffstat (limited to 'std/os')
| -rw-r--r-- | std/os/child_process.zig | 4 | ||||
| -rw-r--r-- | std/os/index.zig | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/std/os/child_process.zig b/std/os/child_process.zig index c85202c9ed..27a91c1619 100644 --- a/std/os/child_process.zig +++ b/std/os/child_process.zig @@ -363,7 +363,7 @@ pub const ChildProcess = struct { const dev_null_fd = if (any_ignore) blk: { const dev_null_path = "/dev/null"; var fixed_buffer_mem: [dev_null_path.len + 1]u8 = undefined; - var fixed_allocator = mem.FixedBufferAllocator.init(fixed_buffer_mem[0..]); + var fixed_allocator = std.heap.FixedBufferAllocator.init(fixed_buffer_mem[0..]); break :blk try os.posixOpen(&fixed_allocator.allocator, "/dev/null", posix.O_RDWR, 0); } else blk: { break :blk undefined; @@ -472,7 +472,7 @@ pub const ChildProcess = struct { const nul_handle = if (any_ignore) blk: { const nul_file_path = "NUL"; var fixed_buffer_mem: [nul_file_path.len + 1]u8 = undefined; - var fixed_allocator = mem.FixedBufferAllocator.init(fixed_buffer_mem[0..]); + var fixed_allocator = std.heap.FixedBufferAllocator.init(fixed_buffer_mem[0..]); break :blk try os.windowsOpen(&fixed_allocator.allocator, "NUL", windows.GENERIC_READ, windows.FILE_SHARE_READ, windows.OPEN_EXISTING, windows.FILE_ATTRIBUTE_NORMAL); } else blk: { diff --git a/std/os/index.zig b/std/os/index.zig index 2131e72760..7e9a12c62b 100644 --- a/std/os/index.zig +++ b/std/os/index.zig @@ -1702,12 +1702,12 @@ pub fn openSelfExe() !os.File { Os.linux => { const proc_file_path = "/proc/self/exe"; var fixed_buffer_mem: [proc_file_path.len + 1]u8 = undefined; - var fixed_allocator = mem.FixedBufferAllocator.init(fixed_buffer_mem[0..]); + var fixed_allocator = std.heap.FixedBufferAllocator.init(fixed_buffer_mem[0..]); return os.File.openRead(&fixed_allocator.allocator, proc_file_path); }, Os.macosx, Os.ios => { var fixed_buffer_mem: [darwin.PATH_MAX * 2]u8 = undefined; - var fixed_allocator = mem.FixedBufferAllocator.init(fixed_buffer_mem[0..]); + var fixed_allocator = std.heap.FixedBufferAllocator.init(fixed_buffer_mem[0..]); const self_exe_path = try selfExePath(&fixed_allocator.allocator); return os.File.openRead(&fixed_allocator.allocator, self_exe_path); }, |
