summaryrefslogtreecommitdiff
path: root/deps/halloc/align.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-10-28 15:38:32 -0700
committerVicent Marti <tanoku@gmail.com>2011-10-28 15:38:32 -0700
commitd78312cddb971477d8008b7b33b0b9e27c8da022 (patch)
tree5f4f7826fcbbaaa3cc8c832dd4754de76afb5684 /deps/halloc/align.h
parent5470aa2507ab77365903ac94e3c3d4898c252fb0 (diff)
downloadlibgit2-halloc.tar.gz
global: Deploy hallochalloc
Diffstat (limited to 'deps/halloc/align.h')
-rw-r--r--deps/halloc/align.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/deps/halloc/align.h b/deps/halloc/align.h
new file mode 100644
index 000000000..4c6e1831f
--- /dev/null
+++ b/deps/halloc/align.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2004-2010 Alex Pankratov. All rights reserved.
+ *
+ * Hierarchical memory allocator, 1.2.1
+ * http://swapped.cc/halloc
+ */
+
+/*
+ * The program is distributed under terms of BSD license.
+ * You can obtain the copy of the license by visiting:
+ *
+ * http://www.opensource.org/licenses/bsd-license.php
+ */
+
+#ifndef _LIBP_ALIGN_H_
+#define _LIBP_ALIGN_H_
+
+/*
+ * a type with the most strict alignment requirements
+ */
+union max_align
+{
+ char c;
+ short s;
+ long l;
+ int i;
+ float f;
+ double d;
+ void * v;
+ void (*q)(void);
+};
+
+typedef union max_align max_align_t;
+
+#endif
+