diff src/win32/7zip/7z/C/Alloc.h @ 1:f9f4f1b99eed

importing src directory
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 10:31:27 -0600
parents
children
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/win32/7zip/7z/C/Alloc.h	Sat Mar 03 10:31:27 2012 -0600
     1.3 @@ -0,0 +1,32 @@
     1.4 +/* Alloc.h -- Memory allocation functions
     1.5 +2008-03-13
     1.6 +Igor Pavlov
     1.7 +Public domain */
     1.8 +
     1.9 +#ifndef __COMMON_ALLOC_H
    1.10 +#define __COMMON_ALLOC_H
    1.11 +
    1.12 +#include <stddef.h>
    1.13 +
    1.14 +void *MyAlloc(size_t size);
    1.15 +void MyFree(void *address);
    1.16 +
    1.17 +#ifdef _WIN32
    1.18 +
    1.19 +void SetLargePageSize();
    1.20 +
    1.21 +void *MidAlloc(size_t size);
    1.22 +void MidFree(void *address);
    1.23 +void *BigAlloc(size_t size);
    1.24 +void BigFree(void *address);
    1.25 +
    1.26 +#else
    1.27 +
    1.28 +#define MidAlloc(size) MyAlloc(size)
    1.29 +#define MidFree(address) MyFree(address)
    1.30 +#define BigAlloc(size) MyAlloc(size)
    1.31 +#define BigFree(address) MyFree(address)
    1.32 +
    1.33 +#endif
    1.34 +
    1.35 +#endif