🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Memory problems: new versus GlobalAlloc

#7004
From: Bob Gonder
Date: Wed, 23 Mar 2005 02:49
15 lines
1507 bytes
"wim bekker" <wim<at>dv-rec<dot>com> wrote:

>What is the difference between new and GlobalAlloc (apart from the fact that 

With GlobalAlloc: "Memory allocated with this function is guaranteed
to be aligned on an 8-byte boundary. "


>How come SetStretchBltMode doesn't work good when using memory allocated 
>with new but works fine with memory allocated with GlobalAlloc?

Two thoughts:
1) Maybe it is happier with the 8byte alignment.
2) Maybe you have an overrun bug that trashes "new", but is hidden by
GlobalAlloc's looser packing.
Technical Details
Message-ID: <c1m141hh73nrcsk12s13ued80o2fgv2u4v@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <42403f3c@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,6b3a605b9bc38024,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Memory problems: new versus GlobalAlloc
Date: Tue, 22 Mar 2005 18:49:27 -0800
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <c1m141hh73nrcsk12s13ued80o2fgv2u4v@4ax.com>
References: <42403f3c@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.77.146.221
X-Trace: newsgroups.borland.com 1111546162 67.77.146.221 (22 Mar 2005 18:49:22 -0800)
Lines: 17
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail