MCPcopy Create free account
hub / github.com/IntegralPilot/wasm_os / memcpy

Function memcpy

stdlib/c/stdlib.c:15–22  ·  view source on GitHub ↗

make our own memcpy function

Source from the content-addressed store, hash-verified

13
14// make our own memcpy function
15void* memcpy(void* dest, const void* src, size_t n) {
16 char* csrc = (char*)src;
17 char* cdest = (char*)dest;
18 for (size_t i = 0; i < n; i++) {
19 cdest[i] = csrc[i];
20 }
21 return dest;
22}
23
24// make our own realloc function
25void* realloc(void* ptr, size_t new_size) {

Callers 1

reallocFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected