MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / memcpy_copies_bytes

Function memcpy_copies_bytes

tests/integration/platform_stdlib.rs:263–287  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

261
262 grown: u8* = 0 as u8*
263 resized := alloc.reallocate(ptr, 5, 19, 64)
264 match resized {
265 Ok(value) -> { grown = value }
266 Err(error) -> { return 3 }
267 }
268 if (grown as u64) % 64 != 0 { return 4 }
269 if grown[0] != 17 or grown[4] != 93 { return 5 }
270
271 failed := alloc.reallocate(grown, 19, 1099511627776, 64)
272 match failed {
273 Ok(value) -> { return 9 }
274 Err(error) -> {}
275 }
276 if grown[0] != 17 or grown[4] != 93 { return 10 }
277 alloc.deallocate(grown, 19, 64)
278
279 zero: u8* = 0 as u8*
280 empty := alloc.allocate(0, 128)
281 match empty {
282 Ok(value) -> { zero = value }
283 Err(error) -> { return 11 }
284 }
285 if zero == null or (zero as u64) % 128 != 0 { return 12 }
286 alloc.deallocate(zero, 0, 128)
287
288 invalid := alloc.allocate(8, 3)
289 match invalid {
290 Ok(value) -> { return 6 }

Callers

nothing calls this directly

Calls 1

run_hllFunction · 0.70

Tested by

no test coverage detected