Stubs from memory utilities
This commit is contained in:
parent
7a15e00cc2
commit
98ad3282c1
2 changed files with 69 additions and 0 deletions
39
src/kstd/Memory.cc
Normal file
39
src/kstd/Memory.cc
Normal 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
30
src/kstd/Memory.hh
Normal 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__ */
|
Loading…
Add table
Add a link
Reference in a new issue