Author: greatlrd
Date: Sun Jan 7 18:11:57 2007
New Revision: 25339
URL:
http://svn.reactos.org/svn/reactos?rev=25339&view=rev
Log:
prepare for sync of zlib
add malloc to usetup. it only will be use by zlib 1.2.3 when the sync is finish
Modified:
trunk/reactos/base/setup/usetup/cabinet.c
Modified: trunk/reactos/base/setup/usetup/cabinet.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/cabinet.…
==============================================================================
--- trunk/reactos/base/setup/usetup/cabinet.c (original)
+++ trunk/reactos/base/setup/usetup/cabinet.c Sun Jan 7 18:11:57 2007
@@ -66,6 +66,20 @@
/* Needed by zlib, but we don't want the dependency on msvcrt.dll */
+
+/* round to 16 bytes + alloc at minimum 16 bytes */
+#define ROUND_SIZE(size) (max(16, ROUND_UP(size, 16)))
+
+void* __cdecl malloc(size_t _size)
+{
+ size_t nSize = ROUND_SIZE(_size);
+
+ if (nSize<_size)
+ return NULL;
+
+ return RtlAllocateHeap(ProcessHeap, HEAP_ZERO_MEMORY, nSize);
+}
+
void __cdecl free(void* _ptr)
{