int libmem_lock(uint8_t *start, size_t size);
libmem_lock locks a block of memory using a LIBMEM driver.
start — A pointer to the start address of the memory range to lock.
size — The size of the memory range to lock in bytes.
libmem_lock returns — The LIBMEM status result.
This function locates the LIBMEM driver for the address pointed to by start and then calls the LIBMEM driver's lock function.
int res; res = libmem_lock((uint8_t *)0x10000000, 1024); if (res == LIBMEM_STATUS_SUCCESS) printf("libmem_lock : success\n"); else printf("libmem_lock : failed (%d)\n", res);