File tree Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ pub const GeneralPurposeAllocatorConfig = DebugAllocatorConfig;
2424/// Deprecated; to be removed after 0.14.0 is tagged.
2525pub const GeneralPurposeAllocator = DebugAllocator ;
2626
27+ pub const uefi = @import ("heap/uefi_allocators.zig" );
28+
2729const memory_pool = @import ("heap/memory_pool.zig" );
2830pub const MemoryPool = memory_pool .MemoryPool ;
2931pub const MemoryPoolAligned = memory_pool .MemoryPoolAligned ;
@@ -355,7 +357,7 @@ else if (builtin.target.isWasm()) .{
355357 .ptr = undefined ,
356358 .vtable = & SbrkAllocator (std .os .plan9 .sbrk ).vtable ,
357359} else if (builtin .target .os .tag == .uefi )
358- std . os . uefi .global_page_allocator .allocator ()
360+ uefi .global_page_allocator .allocator ()
359361else
360362 .{
361363 .ptr = undefined ,
Original file line number Diff line number Diff line change 1- const std = @import ("../../ std.zig" );
1+ const std = @import ("../std.zig" );
22
33const mem = std .mem ;
44const uefi = std .os .uefi ;
@@ -7,6 +7,9 @@ const Allocator = mem.Allocator;
77
88const assert = std .debug .assert ;
99
10+ pub var global_page_allocator = PageAllocator {};
11+ pub var global_pool_allocator = PoolAllocator {};
12+
1013/// Allocates memory in pages.
1114///
1215/// This allocator is backed by `allocatePages` and is therefore only suitable for usage when Boot Services are available.
Original file line number Diff line number Diff line change @@ -14,14 +14,6 @@ pub const tables = @import("uefi/tables.zig");
1414/// used by UEFI applications to allocate pool memory.
1515pub var efi_pool_memory_type : tables.MemoryType = .LoaderData ;
1616
17- const allocator = @import ("uefi/allocator.zig" );
18- pub const PageAllocator = allocator .Page ;
19- pub const PoolAllocator = allocator .Pool ;
20- pub const RawPoolAllocator = allocator .RawPool ;
21-
22- pub var global_page_allocator = PageAllocator {};
23- pub var global_pool_allocator = PoolAllocator {};
24-
2517/// The EFI image's handle that is passed to its entry point.
2618pub var handle : Handle = undefined ;
2719
You can’t perform that action at this time.
0 commit comments