🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #1091

Re: malloc versus GlobalAlloc

#1091
From: dhoke
Date: Wed, 21 Nov 2007 07:34
68 lines
4207 bytes
It does not directly contain the code for new/delete/malloc/free/whatever, 
but I'm pretty sure that _if_ you're linking with the dynamic runtime 
libraries (_not_ the static libraries), new/delete/malloc/etc will 
eventually call into it.

in bds2006, in the installation tree (with library source), the 
implementations of the various items are located in 
<bdsinstalldir>\source\cpprtl\Source\memory\.

"Eyyub Volkan �ektimur" <evcektimur@prokon.com.tr> wrote in message 
news:4743d86b@newsgroups.borland.com...
> thanks for your answer. i don't think that borlndMM.dll is the one i'm 
> searching for, because, when i try to set my memory managment 
> (SetMemoryManager(...)) it does not handle C type malloc & free and also 
> it does not handle new, new[], delete, delete[] on regular types... i 
> guess it's used only in VCL, when i tried to create a VCL object, memory 
> manager functions are triggered, but nothing else. thanks anyway,...
>
> "dhoke" <dhoke.nojunk@east-shore.com> wrote in message 
> news:4743226d$1@newsgroups.borland.com...
>>
>> "Eyyub Volkan �ektimur" <evcektimur@prokon.com.tr> wrote in message 
>> news:4742dbe3@newsgroups.borland.com...
>>> 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
>>>
>>> i was expecting to find "C:\WINDOWS\system32\CC3260MT.DLL" (i'm using 
>>> bcb 6.0)
>>>
>>> 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) ... 
>>> thanks again
>>>
>>
>> At least for bds2006 (don't know about BCB6), and appears to for the 
>> CB2007trial and radstudio2007trial versions:
>>
>> Borland(/CodeGear) does have its own memory management.  (Not sure what 
>> you've found with your search.)
>>
>> Borland has a plug-in memory management architecture, whereby you can 
>> (well some people can) replace the memory manager functionality.
>>
>> A replacement memory manager (borlndmm.dll), is part of product 
>> installation, installed in the ...\bin directory of the installation 
>> tree.
>>
>> Borland's memory manager (since at least bds2006) is apparently a copy or 
>> derivative of the FastMM memory manager 
>> (http://sourceforge.net/projects/fastmm/).
>>
>> Borland's libraries are implemented such that a plugin replacement memory 
>> manager will _not_ be used if an application/dll is linked with static 
>> libraries (at least with bds2006.)
>>
>> You might want to redirect this topic to the .rtl newsgroup, wrt/ B/CG's 
>> runtime library implementation.
>>
>
> 
Technical Details
Message-ID: <4743dfaf$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <47429a08$1@newsgroups.borland.com> <dh75k3ptds34av2aaj6gkjcov3634j36j0@4ax.com> <4742dbe3@newsgroups.borland.com> <4743226d$1@newsgroups.borland.com> <4743d86b@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
Reply-To: "dhoke" <dhoke.nojunk@east-shore.com>
From: "dhoke" <dhoke.nojunk@east-shore.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <47429a08$1@newsgroups.borland.com> <dh75k3ptds34av2aaj6gkjcov3634j36j0@4ax.com> <4742dbe3@newsgroups.borland.com> <4743226d$1@newsgroups.borland.com> <4743d86b@newsgroups.borland.com>
Subject: Re: malloc versus GlobalAlloc
Date: Wed, 21 Nov 2007 02:34:41 -0500
Lines: 70
Organization: East Shore Technologies, Inc.
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.3138
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 72.92.178.93
Message-ID: <4743dfaf$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1195630511 72.92.178.93 (20 Nov 2007 23:35:11 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail