Article View: borland.public.cppbuilder.nativeapi
Article #1088Re: malloc versus GlobalAlloc
From: Eyyub Volkan �ektimur
Date: Tue, 20 Nov 2007 14:56
Date: Tue, 20 Nov 2007 14:56
45 lines
3028 bytes
3028 bytes
i was just realized that they are not the same malloc borland used , as you said. I'was creating a message to fix myself, and saw yours. thanks alot again. (i also tried to create memory with msvcrt.malloc and to free it with normal free, it raised an exception , hehe, i'm extremely luck today i gues) "Alan Bellingham" <alan@lspace.org> wrote in message news:j8r5k3tnu3aa63mdjfc3tni7mtqasr4lh1@4ax.com... > "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:
<4742f58f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<47429a08$1@newsgroups.borland.com> <dh75k3ptds34av2aaj6gkjcov3634j36j0@4ax.com> <4742dbe3@newsgroups.borland.com> <j8r5k3tnu3aa63mdjfc3tni7mtqasr4lh1@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,5bc4a8822b5c2c43 X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII From: "Eyyub Volkan �ektimur" <evcektimur@prokon.com.tr> Newsgroups: borland.public.cppbuilder.nativeapi References: <47429a08$1@newsgroups.borland.com> <dh75k3ptds34av2aaj6gkjcov3634j36j0@4ax.com> <4742dbe3@newsgroups.borland.com> <j8r5k3tnu3aa63mdjfc3tni7mtqasr4lh1@4ax.com> Subject: Re: malloc versus GlobalAlloc Date: Tue, 20 Nov 2007 16:56:12 +0200 Lines: 47 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 88.248.77.154 Message-ID: <4742f58f$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1195570575 88.248.77.154 (20 Nov 2007 06:56:15 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail