Stubs from memory utilities

This commit is contained in:
Eryn Wells 2016-03-16 12:10:13 -04:00
parent 7a15e00cc2
commit 98ad3282c1
2 changed files with 69 additions and 0 deletions

39
src/kstd/Memory.cc Normal file
View file

@ -0,0 +1,39 @@
/* Memory.cc
* vim: set tw=80:
* Eryn Wells <eryn@erynwells.me>
*/
/**
* Basic, low-level memory utilities.
*/
namespace kstd {
namespace Memory {
void *
copy(void *to,
const void *from,
size_t length)
{ }
void *
move(void *to,
const void *from,
size_t length)
{ }
void *
zero(void *s,
size_t length)
{ }
void *
set(void *s,
uint8_t value,
size_t length)
{ }
} /* namespace Memory */
} /* namespace kstd */

30
src/kstd/Memory.hh Normal file
View file

@ -0,0 +1,30 @@
/* Memory.hh
* vim: set tw=80:
* Eryn Wells <eryn@erynwells.me>
*/
/**
* Basic, low-level memory utilities.
*/
#ifndef __MEMORY_HH__
#define __MEMORY_HH__
namespace kstd {
namespace Memory {
/** Copy `length` bytes from `from` to `to`. */
void *copy(void *to, const void *from, size_t length);
/** Move `length` bytes from `from` to `to`. */
void *move(void *to, const void *from, size_t length);
/** Set `length` bytes starting at `s` to zero. */
void *zero(void *s, size_t length);
/** Set `length` bytes starting at `s` to `value`. */
void *set(void *s, uint8_t value, size_t length);
} /* namespace Memory */
} /* namespace kstd */
#endif /* __MEMORY_HH__ */