| ... | @@ -29,19 +29,19 @@ fn doMemCheckClientRequestStmt(request: MemCheckClientRequest, a1: usize, a2: us | ... | @@ -29,19 +29,19 @@ fn doMemCheckClientRequestStmt(request: MemCheckClientRequest, a1: usize, a2: us |
| 29 | } | 29 | } |
| 30 | | 30 | |
| 31 | /// Mark memory at qzz.ptr as unaddressable for qzz.len bytes. | 31 | /// Mark memory at qzz.ptr as unaddressable for qzz.len bytes. |
| 32 | pub fn makeMemNoAccess(qzz: []u8) void { | 32 | pub fn makeMemNoAccess(qzz: []const u8) void { |
| 33 | _ = doMemCheckClientRequestExpr(0, // default return | 33 | _ = doMemCheckClientRequestExpr(0, // default return |
| 34 | .MakeMemNoAccess, @intFromPtr(qzz.ptr), qzz.len, 0, 0, 0); | 34 | .MakeMemNoAccess, @intFromPtr(qzz.ptr), qzz.len, 0, 0, 0); |
| 35 | } | 35 | } |
| 36 | | 36 | |
| 37 | /// Mark memory at qzz.ptr as addressable but undefined for qzz.len bytes. | 37 | /// Mark memory at qzz.ptr as addressable but undefined for qzz.len bytes. |
| 38 | pub fn makeMemUndefined(qzz: []u8) void { | 38 | pub fn makeMemUndefined(qzz: []const u8) void { |
| 39 | _ = doMemCheckClientRequestExpr(0, // default return | 39 | _ = doMemCheckClientRequestExpr(0, // default return |
| 40 | .MakeMemUndefined, @intFromPtr(qzz.ptr), qzz.len, 0, 0, 0); | 40 | .MakeMemUndefined, @intFromPtr(qzz.ptr), qzz.len, 0, 0, 0); |
| 41 | } | 41 | } |
| 42 | | 42 | |
| 43 | /// Mark memory at qzz.ptr as addressable and defined or qzz.len bytes. | 43 | /// Mark memory at qzz.ptr as addressable and defined or qzz.len bytes. |
| 44 | pub fn makeMemDefined(qzz: []u8) void { | 44 | pub fn makeMemDefined(qzz: []const u8) void { |
| 45 | _ = doMemCheckClientRequestExpr(0, // default return | 45 | _ = doMemCheckClientRequestExpr(0, // default return |
| 46 | .MakeMemDefined, @intFromPtr(qzz.ptr), qzz.len, 0, 0, 0); | 46 | .MakeMemDefined, @intFromPtr(qzz.ptr), qzz.len, 0, 0, 0); |
| 47 | } | 47 | } |
| ... | @@ -49,7 +49,7 @@ pub fn makeMemDefined(qzz: []u8) void { | ... | @@ -49,7 +49,7 @@ pub fn makeMemDefined(qzz: []u8) void { |
| 49 | /// Similar to makeMemDefined except that addressability is | 49 | /// Similar to makeMemDefined except that addressability is |
| 50 | /// not altered: bytes which are addressable are marked as defined, | 50 | /// not altered: bytes which are addressable are marked as defined, |
| 51 | /// but those which are not addressable are left unchanged. | 51 | /// but those which are not addressable are left unchanged. |
| 52 | pub fn makeMemDefinedIfAddressable(qzz: []u8) void { | 52 | pub fn makeMemDefinedIfAddressable(qzz: []const u8) void { |
| 53 | _ = doMemCheckClientRequestExpr(0, // default return | 53 | _ = doMemCheckClientRequestExpr(0, // default return |
| 54 | .MakeMemDefinedIfAddressable, @intFromPtr(qzz.ptr), qzz.len, 0, 0, 0); | 54 | .MakeMemDefinedIfAddressable, @intFromPtr(qzz.ptr), qzz.len, 0, 0, 0); |
| 55 | } | 55 | } |
| ... | @@ -58,7 +58,7 @@ pub fn makeMemDefinedIfAddressable(qzz: []u8) void { | ... | @@ -58,7 +58,7 @@ pub fn makeMemDefinedIfAddressable(qzz: []u8) void { |
| 58 | /// string which is included in any messages pertaining to addresses | 58 | /// string which is included in any messages pertaining to addresses |
| 59 | /// within the specified memory range. Has no other effect on the | 59 | /// within the specified memory range. Has no other effect on the |
| 60 | /// properties of the memory range. | 60 | /// properties of the memory range. |
| 61 | pub fn createBlock(qzz: []u8, desc: [*]u8) usize { | 61 | pub fn createBlock(qzz: []const u8, desc: [*:0]const u8) usize { |
| 62 | return doMemCheckClientRequestExpr(0, // default return | 62 | return doMemCheckClientRequestExpr(0, // default return |
| 63 | .CreateBlock, @intFromPtr(qzz.ptr), qzz.len, @intFromPtr(desc), 0, 0); | 63 | .CreateBlock, @intFromPtr(qzz.ptr), qzz.len, @intFromPtr(desc), 0, 0); |
| 64 | } | 64 | } |
| ... | @@ -74,7 +74,7 @@ pub fn discard(blkindex: usize) bool { | ... | @@ -74,7 +74,7 @@ pub fn discard(blkindex: usize) bool { |
| 74 | /// If suitable addressability is not established, Valgrind prints an | 74 | /// If suitable addressability is not established, Valgrind prints an |
| 75 | /// error message and returns the address of the first offending byte. | 75 | /// error message and returns the address of the first offending byte. |
| 76 | /// Otherwise it returns zero. | 76 | /// Otherwise it returns zero. |
| 77 | pub fn checkMemIsAddressable(qzz: []u8) usize { | 77 | pub fn checkMemIsAddressable(qzz: []const u8) usize { |
| 78 | return doMemCheckClientRequestExpr(0, .CheckMemIsAddressable, @intFromPtr(qzz.ptr), qzz.len, 0, 0, 0); | 78 | return doMemCheckClientRequestExpr(0, .CheckMemIsAddressable, @intFromPtr(qzz.ptr), qzz.len, 0, 0, 0); |
| 79 | } | 79 | } |
| 80 | | 80 | |
| ... | @@ -82,7 +82,7 @@ pub fn checkMemIsAddressable(qzz: []u8) usize { | ... | @@ -82,7 +82,7 @@ pub fn checkMemIsAddressable(qzz: []u8) usize { |
| 82 | /// qzz.len bytes. If suitable addressability and definedness are not | 82 | /// qzz.len bytes. If suitable addressability and definedness are not |
| 83 | /// established, Valgrind prints an error message and returns the | 83 | /// established, Valgrind prints an error message and returns the |
| 84 | /// address of the first offending byte. Otherwise it returns zero. | 84 | /// address of the first offending byte. Otherwise it returns zero. |
| 85 | pub fn checkMemIsDefined(qzz: []u8) usize { | 85 | pub fn checkMemIsDefined(qzz: []const u8) usize { |
| 86 | return doMemCheckClientRequestExpr(0, .CheckMemIsDefined, @intFromPtr(qzz.ptr), qzz.len, 0, 0, 0); | 86 | return doMemCheckClientRequestExpr(0, .CheckMemIsDefined, @intFromPtr(qzz.ptr), qzz.len, 0, 0, 0); |
| 87 | } | 87 | } |
| 88 | | 88 | |