summaryrefslogtreecommitdiffstats
path: root/fastwriter.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2012-11-25 08:04:11 +0100
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2012-11-25 08:04:11 +0100
commitc6db5ea47cdbedd3a17a17984b231e11476bfa97 (patch)
tree914a64d68f60e6c6f689b1b586558b0ddee5ad8d /fastwriter.c
parent9742a733bb8b06d26c90f2ccb330366d0ab1ae9e (diff)
downloadfastwriter-c6db5ea47cdbedd3a17a17984b231e11476bfa97.tar.gz
fastwriter-c6db5ea47cdbedd3a17a17984b231e11476bfa97.tar.bz2
fastwriter-c6db5ea47cdbedd3a17a17984b231e11476bfa97.tar.xz
fastwriter-c6db5ea47cdbedd3a17a17984b231e11476bfa97.zip
Use memcpy implementation by Daniel Vik
Diffstat (limited to 'fastwriter.c')
-rw-r--r--fastwriter.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fastwriter.c b/fastwriter.c
index e812681..c5bf301 100644
--- a/fastwriter.c
+++ b/fastwriter.c
@@ -19,6 +19,7 @@
#include "private.h"
#include "default.h"
#include "sysinfo.h"
+#include "memcpy.h"
fastwriter_t *fastwriter_init(const char *fs, fastwriter_flags_t flags) {
fastwriter_t *ctx;
@@ -275,11 +276,11 @@ int fastwriter_push(fastwriter_t *ctx, size_t size, const void *data) {
if (part1 < size) {
// tail < pos (we have checked for free space)
end = size - part1;
- memcpy(ctx->buffer + ctx->pos, data, part1);
- memcpy(ctx->buffer, data + part1, end);
+ fast_memcpy(ctx->buffer + ctx->pos, data, part1);
+ fast_memcpy(ctx->buffer, data + part1, end);
ctx->pos = end;
} else {
- memcpy(ctx->buffer + ctx->pos, data, size);
+ fast_memcpy(ctx->buffer + ctx->pos, data, size);
ctx->pos += size;
if (ctx->pos == ctx->size) ctx->pos = 0;