about summary refs log tree commit homepage
path: root/trywrite.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2012-03-05 19:20:21 -0800
committerEric Wong <normalperson@yhbt.net>2012-03-05 19:20:21 -0800
commit1d8f75976a2516f93cbf70fe9e1a8979583929f9 (patch)
tree1056a43cb212edd7ff448d0a4dbad8b71c6a0485 /trywrite.c
parent5cb6826b3a6f974d720d8f9d1589b6c06f22bf52 (diff)
downloadcmogstored-1d8f75976a2516f93cbf70fe9e1a8979583929f9.tar.gz
Aligned allocations are wasteful and tend to fragment the heap.
They only benefit us when dealing with frequently _written_ data
that we don't want unnecessarily shared/bounced between threads.
So swap mog_cachealign() for xmalloc() wherever we have
infrequently-written data areas.
Diffstat (limited to 'trywrite.c')
-rw-r--r--trywrite.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/trywrite.c b/trywrite.c
index 2e0fca7..0c7a68b 100644
--- a/trywrite.c
+++ b/trywrite.c
@@ -12,7 +12,7 @@ struct mog_wbuf {
 
 static void * wbuf_new(size_t total, struct iovec *iov, int iovcnt)
 {
-        struct mog_wbuf *wbuf = mog_cachealign(sizeof(struct mog_wbuf) + total);
+        struct mog_wbuf *wbuf = xmalloc(sizeof(struct mog_wbuf) + total);
         void *dst = wbuf->buf;
         int i;