Fixed a memory offset calculation error in sys_mem_delete().
Proper locking has been added to sys_mem_create() and sys_mem_delete()
system calls.