aboutsummaryrefslogtreecommitdiff
path: root/src/rt/rust_util.h
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2011-04-02 19:03:43 -0700
committerGraydon Hoare <[email protected]>2011-04-02 19:05:12 -0700
commit8e9c5b96fbaa338e0b60e3e8c0127e0b3e4cee76 (patch)
treec893449b391e9aec1c6aa3299ab975b4cd053be0 /src/rt/rust_util.h
parentGitignore the recommended build directory (diff)
downloadrust-8e9c5b96fbaa338e0b60e3e8c0127e0b3e4cee76.tar.xz
rust-8e9c5b96fbaa338e0b60e3e8c0127e0b3e4cee76.zip
Change rust_vec to have a 16-byte header, to 16-byte-align vec-body data. Major perf win.
Diffstat (limited to 'src/rt/rust_util.h')
-rw-r--r--src/rt/rust_util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rt/rust_util.h b/src/rt/rust_util.h
index 5f13a3c8..14a865bd 100644
--- a/src/rt/rust_util.h
+++ b/src/rt/rust_util.h
@@ -172,6 +172,7 @@ rust_vec : public rc_base<rust_vec>
{
size_t alloc;
size_t fill;
+ size_t pad; // Pad to align data[0] to 16 bytes.
uint8_t data[];
rust_vec(rust_dom *dom, size_t alloc, size_t fill, uint8_t const *d) :
alloc(alloc),