From 795fdacd5fc221eaf22ac51006fcf78064f51906 Mon Sep 17 00:00:00 2001 From: stanton Date: Wed, 30 Sep 1998 23:57:18 +0000 Subject: merged tcl8.0.4 changes to fix Windows memory allocation --- win/tclWinPort.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/win/tclWinPort.h b/win/tclWinPort.h index c1659fc..faca7e7 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPort.h,v 1.5 1998/09/14 18:40:20 stanton Exp $ + * RCS: @(#) $Id: tclWinPort.h,v 1.6 1998/09/30 23:57:18 stanton Exp $ */ #ifndef _TCLWINPORT @@ -62,11 +62,12 @@ * use by tclAlloc.c. */ -#define TclpSysAlloc(size, isBin) ((void*)GlobalAlloc(GMEM_FIXED, \ - (DWORD)size)) -#define TclpSysFree(ptr) (GlobalFree((HGLOBAL)ptr)) -#define TclpSysRealloc(ptr, size) ((void*)GlobalReAlloc((HGLOBAL)ptr, \ - (DWORD)size, 0)) +#define TclpSysAlloc(size, isBin) ((void*)HeapAlloc(GetProcessHeap(), \ + (DWORD)0, (DWORD)size)) +#define TclpSysFree(ptr) (HeapFree(GetProcessHeap(), \ + (DWORD)0, (HGLOBAL)ptr)) +#define TclpSysRealloc(ptr, size) ((void*)HeapReAlloc(GetProcessHeap(), \ + (DWORD)0, (LPVOID)ptr, (DWORD)size)) /* * The default platform eol translation on Windows is TCL_TRANSLATE_CRLF: -- cgit v0.12