File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -31,26 +31,6 @@ pub fn new() !*TCCState {
31
31
return tcc_new () orelse error .TCCNewError ;
32
32
}
33
33
34
- const page_size = std .heap .page_size_min ;
35
-
36
- pub const DynMem = struct {
37
- allocator : std.mem.Allocator ,
38
- mem : []align (page_size ) u8 ,
39
-
40
- pub fn alloc (allocator : std.mem.Allocator , size : usize ) ! DynMem {
41
- const mem = try allocator .alignedAlloc (u8 , page_size , size );
42
- return .{
43
- .allocator = allocator ,
44
- .mem = mem ,
45
- };
46
- }
47
-
48
- pub fn free (self : DynMem ) void {
49
- std .posix .mprotect (self .mem , std .posix .PROT .READ | std .posix .PROT .WRITE ) catch {};
50
- self .allocator .free (self .mem );
51
- }
52
- };
53
-
54
34
pub const TCCState = opaque {
55
35
/// set CONFIG_TCCDIR at runtime
56
36
pub fn set_lib_path (self : * TCCState , path : [:0 ]const u8 ) void {
You can’t perform that action at this time.
0 commit comments