aboutsummaryrefslogtreecommitdiff
path: root/std/packed_int_array.zig
diff options
context:
space:
mode:
Diffstat (limited to 'std/packed_int_array.zig')
-rw-r--r--std/packed_int_array.zig13
1 files changed, 5 insertions, 8 deletions
diff --git a/std/packed_int_array.zig b/std/packed_int_array.zig
index ffca88b53b..5cbab2d33b 100644
--- a/std/packed_int_array.zig
+++ b/std/packed_int_array.zig
@@ -603,8 +603,7 @@ test "PackedInt(Array/Slice)Endian" {
}
//@NOTE: Need to manually update this list as more posix os's get
-// added to DirectAllocator. Windows can be added too when DirectAllocator
-// switches to VirtualAlloc.
+// added to DirectAllocator.
//These tests prove we aren't accidentally accessing memory past
// the end of the array/slice by placing it at the end of a page
@@ -613,7 +612,7 @@ test "PackedInt(Array/Slice)Endian" {
// don't account for the bounds.
test "PackedIntArray at end of available memory" {
switch (builtin.os) {
- .linux, .macosx, .ios, .freebsd, .netbsd => {},
+ .linux, .macosx, .ios, .freebsd, .netbsd, .windows => {},
else => return,
}
const PackedArray = PackedIntArray(u3, 8);
@@ -623,8 +622,7 @@ test "PackedIntArray at end of available memory" {
p: PackedArray,
};
- var da = std.heap.DirectAllocator.init();
- const allocator = &da.allocator;
+ const allocator = std.heap.direct_allocator;
var pad = try allocator.create(Padded);
defer allocator.destroy(pad);
@@ -633,13 +631,12 @@ test "PackedIntArray at end of available memory" {
test "PackedIntSlice at end of available memory" {
switch (builtin.os) {
- .linux, .macosx, .ios, .freebsd, .netbsd => {},
+ .linux, .macosx, .ios, .freebsd, .netbsd, .windows => {},
else => return,
}
const PackedSlice = PackedIntSlice(u11);
- var da = std.heap.DirectAllocator.init();
- const allocator = &da.allocator;
+ const allocator = std.heap.direct_allocator;
var page = try allocator.alloc(u8, std.mem.page_size);
defer allocator.free(page);