Article View: borland.public.cppbuilder.nativeapi
Article #1087Re: malloc versus GlobalAlloc
From: Alan Bellingham
Date: Tue, 20 Nov 2007 14:25
Date: Tue, 20 Nov 2007 14:25
37 lines
2404 bytes
2404 bytes
"Eyyub Volkan ๏ฟฝektimur" <evcektimur@prokon.com.tr> wrote: >one more question; > >i traversed all modules loaded by EXE (EnumProcessModules) and queried that >which module including "malloc" >(GetProcAddress(modules[cx],"malloc")!=NULL). the result is ; > >malloc in C:\WINDOWS\system32\msvcrt.dll Ah, yes. This would appear to be an exported malloc() - i.e. visible when you look at the table of symbols exported from an executable. It's fairly likely (OK, at least 99.9% chance*) that at some point, you're linking to a Microsoft DLL (e.g making any use of the operating system ...), and at that point, you're going to find something that uses MSVCRT. >does not borland have a seperate memory manager that handles malloc ? if >there is, why malloc is in msvcrt.dll ? as i know CC3260* is the >VCL-Compliant of CRT, so it's making more sense to include malloc in >CC3260*.dll. does borland using microsoft's memory management DLL >(msvcrt.dll) ? (if it's, CC3260* should be a mapper to msvcrt.dll) ... The malloc() that Borland code uses will not be the one you've found. The Borland libraries will be using a non-exported version, which won't show up in your explorations. Well, not unless you use borlndmm.dll (and I've not looked to see what it actually exports). Alan Bellingham * Note that this statistic is 100% likely to be made up -- Team Browns ACCU Conference 2008: 2-5 April 2008 - Oxford, UK
Technical Details
Message-ID:
<j8r5k3tnu3aa63mdjfc3tni7mtqasr4lh1@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<47429a08$1@newsgroups.borland.com> <dh75k3ptds34av2aaj6gkjcov3634j36j0@4ax.com> <4742dbe3@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,5bc4a8822b5c2c43 X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII From: Alan Bellingham <alan@lspace.org> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: malloc versus GlobalAlloc Date: Tue, 20 Nov 2007 14:25:36 +0000 Organization: Private Reply-To: alan@lspace.org Message-ID: <j8r5k3tnu3aa63mdjfc3tni7mtqasr4lh1@4ax.com> References: <47429a08$1@newsgroups.borland.com> <dh75k3ptds34av2aaj6gkjcov3634j36j0@4ax.com> <4742dbe3@newsgroups.borland.com> X-Newsreader: Forte Agent 4.2/32.1118 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 193.129.251.253 X-Trace: newsgroups.borland.com 1195568736 193.129.251.253 (20 Nov 2007 06:25:36 -0700) Lines: 37 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail