MCPcopy Create free account
hub / github.com/Rust-GPU/rust-cuda / test_cuda_malloc_locked

Function test_cuda_malloc_locked

crates/cust/src/memory/malloc.rs:401–412  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

399
400 #[test]
401 fn test_cuda_malloc_locked() {
402 let _context = crate::quick_init().unwrap();
403 unsafe {
404 let locked = cuda_malloc_locked::<u64>(1).unwrap();
405 assert!(!locked.is_null());
406
407 // Write to the allocated memory
408 *locked = 64;
409
410 cuda_free_locked(locked).unwrap();
411 }
412 }
413
414 #[test]
415 fn test_cuda_malloc_locked_zero_bytes() {

Callers

nothing calls this directly

Calls 2

quick_initFunction · 0.85
cuda_free_lockedFunction · 0.85

Tested by

no test coverage detected