fixed bug #1005296 - NSIS build error on Linux with g++ 3.4.0

- upgraded to the latest LZMA SDK


git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3638 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2004-08-21 10:50:17 +00:00
parent ec6957f356
commit 7c6eea5d98
4 changed files with 284 additions and 0 deletions

View file

@ -0,0 +1,52 @@
// Common/Alloc.cpp
#include "StdAfx.h"
#ifndef WIN32
#include <stdlib.h>
#endif
#include "Alloc.h"
// #include "NewHandler.h"
void *MyAlloc(size_t size)
{
return ::malloc(size);
}
void MyFree(void *address)
{
::free(address);
}
void *BigAlloc(size_t size)
{
#ifdef WIN32
return ::VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE);
#else
return ::malloc(size);
#endif
}
void BigFree(void *address)
{
if (address == 0)
return;
#ifdef WIN32
::VirtualFree(address, 0, MEM_RELEASE);
#else
::free(address);
#endif
}
/*
void *BigAllocE(size_t size)
{
void *res = BigAlloc(size);
#ifndef _NO_EXCEPTIONS
if (res == 0)
throw CNewException();
#endif
return res;
}
*/