////////////////////////////////////////////////////////////////////////////////
-// $Id: vldheap.cpp,v 1.13 2006/11/18 03:12:35 dmouldin Exp $
//
// Visual Leak Detector - Internal C++ Heap Management
// Copyright (c) 2006 Dan Moulding
// Local helper functions.
static inline void vlddelete (void *block);
-static inline void* vldnew (unsigned int size, const char *file, int line);
+static inline void* vldnew (size_t size, const char *file, int line);
// scalar delete operator - Delete operator used to free internally used memory
// back to VLD's private heap.
// If the allocation succeeds, a pointer to the allocated memory block is
// returned. If the allocation fails, NULL is returned.
//
-void* operator new (unsigned int size, const char *file, int line)
+void* operator new (size_t size, const char *file, int line)
{
return vldnew(size, file, line);
}
// If the allocation succeeds, a pointer to the allocated memory block is
// returned. If the allocation fails, NULL is returned.
//
-void* operator new [] (unsigned int size, const char *file, int line)
+void* operator new [] (size_t size, const char *file, int line)
{
return vldnew(size, file, line);
}
// If the memory allocation succeeds, a pointer to the allocated memory
// block is returned. If the allocation fails, NULL is returned.
//
-void* vldnew (unsigned int size, const char *file, int line)
+void* vldnew (size_t size, const char *file, int line)
{
vldblockheader_t *header = (vldblockheader_t*)RtlAllocateHeap(vldheap, 0x0, size + sizeof(vldblockheader_t));
static SIZE_T serialnumber = 0;
// Return a pointer to the beginning of the data section of the block.
return (void*)VLDBLOCKDATA(header);
-}
\ No newline at end of file
+}