๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: malloc versus GlobalAlloc

#1089
From: dhoke
Date: Tue, 20 Nov 2007 18:07
44 lines
2949 bytes
"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: <4743226d$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!feeder.news-service.com!newsfeed.freenet.de!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>

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>
Subject: Re: malloc versus GlobalAlloc
Date: Tue, 20 Nov 2007 13:07:11 -0500
Lines: 46
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: <4743226d$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1195582061 72.92.178.93 (20 Nov 2007 10:07:41 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail