1 /* 2 * Copyright 2002-2023, Haiku Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT license. 4 * 5 * Authors: 6 * Ingo Weinhold, bonefish@cs.tu-berlin.de. 7 * Axel Dörfler, axeld@pinc-software.de. 8 */ 9 10 #include <string.h> 11 12 #include <KernelExport.h> 13 14 #include <vm/vm_page.h> 15 16 17 extern "C" status_t 18 user_memcpy(void *to, const void *from, size_t size) 19 { 20 memcpy(to, from, size); 21 return B_OK; 22 } 23 24 25 extern "C" ssize_t 26 user_strlcpy(char *to, const char *from, size_t size) 27 { 28 return strlcpy(to, from, size); 29 } 30 31 32 extern "C" status_t 33 user_memset(void* target, char data, size_t length) 34 { 35 memset(target, data, length); 36 return B_OK; 37 } 38 39 40 page_num_t 41 vm_page_num_pages(void) 42 { 43 return 65536; 44 // TODO: 256 MB. Return real value? 45 } 46