Re: VirtualAlloc and new
- From: "Hendrik Schober" <SpamTrap@xxxxxx>
- Date: Mon, 13 Jun 2005 10:40:24 +0200
Simon Trew <ten.enagro@werts> wrote:
> [...] And since 'new' will
> generally call the constructor on whatever object is being allocated, one
> would imagine this would be slower than just allocating the raw memory.
I am not sure how you would use this advantage.
Either you need raw memory, then 'new char[K]'
will do (and won't call any ctors) or you need
initialized objects, in which case you, well,
need them initialized. Of course, you can
allocate raw memory and manually initialize
them later -- but what would that buy you?
> S.
Schobi
--
SpamTrap@xxxxxx is never read
I'm Schobi at suespammers dot org
"Coming back to where you started is not the same as never leaving"
Terry Pratchett
.
- References:
- VirtualAlloc and new
- From: JR Lyon
- Re: VirtualAlloc and new
- From: Peter Koch Larsen
- Re: VirtualAlloc and new
- From: Simon Trew
- VirtualAlloc and new
- Prev by Date: Confusion about integer promotions.
- Next by Date: RE: write single byte to file
- Previous by thread: Re: VirtualAlloc and new
- Next by thread: Re: VirtualAlloc and new
- Index(es):
Relevant Pages
|