summaryrefslogtreecommitdiff
path: root/other-licenses/7zstub/src/Common/Alloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'other-licenses/7zstub/src/Common/Alloc.h')
-rw-r--r--other-licenses/7zstub/src/Common/Alloc.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/other-licenses/7zstub/src/Common/Alloc.h b/other-licenses/7zstub/src/Common/Alloc.h
new file mode 100644
index 0000000000..2ae3891de6
--- /dev/null
+++ b/other-licenses/7zstub/src/Common/Alloc.h
@@ -0,0 +1,29 @@
+// Common/Alloc.h
+
+#ifndef __COMMON_ALLOC_H
+#define __COMMON_ALLOC_H
+
+#include <stddef.h>
+
+void *MyAlloc(size_t size) throw();
+void MyFree(void *address) throw();
+
+#ifdef _WIN32
+
+bool SetLargePageSize();
+
+void *MidAlloc(size_t size) throw();
+void MidFree(void *address) throw();
+void *BigAlloc(size_t size) throw();
+void BigFree(void *address) throw();
+
+#else
+
+#define MidAlloc(size) MyAlloc(size)
+#define MidFree(address) MyFree(address)
+#define BigAlloc(size) MyAlloc(size)
+#define BigFree(address) MyFree(address)
+
+#endif
+
+#endif