www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/06/20:05:36

Mime-Version: 1.0
To: "degausse" <gnatwt AT mailexcite DOT com>, djgpp AT delorie DOT com
From: Nate Eldredge <nate AT cartsys DOT com>
Subject: Re: Allocate Memory using?
Date: Wed, 6 May 1998 17:01:08 -0700
Message-ID: <19980507000106.AAA15093@ppp101.cartsys.com>

At 01:21  5/6/1998 GMT, degausse wrote:
>I want to allocate a buffer for page flipping (for graphics animation).
>Which should I use -- malloc, new or __dpmi_allocate_memory, so that the
>performance is optimal?

It makes absolutely no difference as far as performance is concerned-- it's
all the same memory. However, I'd advise against using
`__dpmi_allocate_memory' for any task for which it is not absolutely
necessary, since it's so much more complicated to use. `new' will probably
make more sense if you're using C++, otherwise `malloc' is fine.

If you want to be assured that your buffer does not get swapped out, you can
use `__dpmi_lock_linear_region'. Note that this requires that enough
physical memory be free.

Nate Eldredge
nate AT cartsys DOT com



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019