Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: "degausse" , djgpp AT delorie DOT com From: Nate Eldredge Subject: Re: Allocate Memory using? Date: Wed, 6 May 1998 17:01:08 -0700 Message-ID: <19980507000106.AAA15093@ppp101.cartsys.com> Precedence: bulk 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