MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / liballoc_memcpy

Function liballoc_memcpy

Kernel/src/liballoc/liballoc.c:124–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122 return s;
123}
124static void* liballoc_memcpy(void* s1, const void* s2, size_t n)
125{
126 char *cdest;
127 const char *csrc;
128 unsigned int *ldest = (unsigned int*)s1;
129 const unsigned int *lsrc = (const unsigned int*)s2;
130
131 while (n >= sizeof(unsigned int))
132 {
133 *ldest++ = *lsrc++;
134 n -= sizeof(unsigned int);
135 }
136
137 cdest = (char*)ldest;
138 csrc = (const char*)lsrc;
139
140 while (n > 0)
141 {
142 *cdest++ = *csrc++;
143 n -= 1;
144 }
145
146 return s1;
147}
148
149
150// ***************************************************************

Callers 1

PREFIX(realloc)Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected