Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!swrinde!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!lll-winken!ames!vsi1!hsv3!jls From: jls@hsv3.UUCP (James Seidman) Newsgroups: comp.windows.ms Subject: DLL memory management and the heapsize Message-ID: <4944@hsv3.UUCP> Date: 24 Sep 90 16:42:34 GMT Reply-To: jls@headland.UUCP (James Seidman) Distribution: usa Organization: Video Seven / Headland Technology Lines: 20 The SDK doesn't describe very clearly (at least to me) how DLLs handle their local heap. It says at one point that the heap can grow if a LocalAlloc requires more memory than is currently available. Does it mean only up to the amount specified in HEAPSIZE? Does that mean that I can set HEAPSIZE to 64K and not necessary have that much memory munched if I don't allocate it? The reason I ask is that I have a DLL which can't determine until runtime how much space it needs. It could be anywhere from 5K to 62K, depending on the circumstances. I'd hate to reserve 62K where I only really needed 5K. (And please don't tell me to use GlobalAlloc(), either... I'm dereferencing pointers in tight loops and having them be far would cause performance impairments.) Thanks for any help! -- Jim Seidman (Drax), the accidental engineer. UUCP: ames!vsi1!headland!jls ARPA: jls%headland.UUCP@ames.nasa.arc.gov