summaryrefslogtreecommitdiffstats
path: root/third_party/lzma_sdk/Alloc.c
diff options
context:
space:
mode:
authorbashi@chromium.org <bashi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-18 23:34:41 +0000
committerbashi@chromium.org <bashi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-18 23:34:41 +0000
commit50cf47f0c5a315d9f0c092ece1f3c9d207dbd650 (patch)
tree9c2b550cf1e892ae4b9283fd5f995d07eb1e5e9f /third_party/lzma_sdk/Alloc.c
parent23981084df9ff50201ae6971b743270bd35e0e4b (diff)
downloadchromium_src-50cf47f0c5a315d9f0c092ece1f3c9d207dbd650.zip
chromium_src-50cf47f0c5a315d9f0c092ece1f3c9d207dbd650.tar.gz
chromium_src-50cf47f0c5a315d9f0c092ece1f3c9d207dbd650.tar.bz2
Revert 132887 - Update lzma_sdk to 9.20
Copied only C code required to open 7z archive files and uncompress LZMA compression. Updated chrome/installer/util/lzma_util.cc to follow API changes. BUG=None TEST=installer_util_unittests --gtest_filter='LzmaUtilTest.*' Review URL: http://codereview.chromium.org/10114005 TBR=bashi@chromium.org Review URL: https://chromiumcodereview.appspot.com/10035048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132895 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/lzma_sdk/Alloc.c')
-rw-r--r--third_party/lzma_sdk/Alloc.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/third_party/lzma_sdk/Alloc.c b/third_party/lzma_sdk/Alloc.c
index 358a7b5..7b5af42 100644
--- a/third_party/lzma_sdk/Alloc.c
+++ b/third_party/lzma_sdk/Alloc.c
@@ -1,7 +1,4 @@
-/* Alloc.c -- Memory allocation functions
-2008-09-24
-Igor Pavlov
-Public domain */
+/* Alloc.c */
#ifdef _WIN32
#include <windows.h>
@@ -25,21 +22,16 @@ void *MyAlloc(size_t size)
if (size == 0)
return 0;
#ifdef _SZ_ALLOC_DEBUG
- {
- void *p = malloc(size);
- fprintf(stderr, "\nAlloc %10d bytes, count = %10d, addr = %8X", size, g_allocCount++, (unsigned)p);
- return p;
- }
- #else
- return malloc(size);
+ fprintf(stderr, "\nAlloc %10d bytes; count = %10d", size, g_allocCount++);
#endif
+ return malloc(size);
}
void MyFree(void *address)
{
#ifdef _SZ_ALLOC_DEBUG
if (address != 0)
- fprintf(stderr, "\nFree; count = %10d, addr = %8X", --g_allocCount, (unsigned)address);
+ fprintf(stderr, "\nFree; count = %10d", --g_allocCount);
#endif
free(address);
}
@@ -103,7 +95,7 @@ void *BigAlloc(size_t size)
#ifdef _7ZIP_LARGE_PAGES
if (g_LargePageSize != 0 && g_LargePageSize <= (1 << 30) && size >= (1 << 18))
{
- void *res = VirtualAlloc(0, (size + g_LargePageSize - 1) & (~(g_LargePageSize - 1)),
+ void *res = VirtualAlloc(0, (size + g_LargePageSize - 1) & (~(g_LargePageSize - 1)),
MEM_COMMIT | MEM_LARGE_PAGES, PAGE_READWRITE);
if (res != 0)
return res;