Re: How to use Delete in right way
From: Oleg Starodumov (com-dot-debuginfo-at-oleg)
Date: 01/28/05
- Next message: Wathava: "Re: How to use Delete in right way"
- Previous message: Pavel Lebedinsky: "Re: How to use Delete in right way"
- In reply to: Pavel Lebedinsky: "Re: How to use Delete in right way"
- Next in thread: Wathava: "Re: How to use Delete in right way"
- Reply: Wathava: "Re: How to use Delete in right way"
- Reply: Pavel Lebedinsky: "Re: How to use Delete in right way"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 28 Jan 2005 11:07:01 +0200
> To be precise, pageheap will also detect this when the block
> is deleted, unless the length of the block is a multiple of 8,
> in which case you should get an access violation at the time of
> corruption.
>
> You can use /unaligned parameter with pageheap to force
> it to always place the block exactly at the end of a page
> but this breaks most non-trivial applications because win32 heap
> is documented to have 8 byte alignment, and many apps depend
> on this.
>
This is true for explicit allocations via HeapAlloc.
If the allocation goes through CRT malloc/new/etc, the CRT's allocation
granularity of 16 bytes hides these problems from PageHeap completely,
unless the length of the block is multiple of 16.
Oleg
- Next message: Wathava: "Re: How to use Delete in right way"
- Previous message: Pavel Lebedinsky: "Re: How to use Delete in right way"
- In reply to: Pavel Lebedinsky: "Re: How to use Delete in right way"
- Next in thread: Wathava: "Re: How to use Delete in right way"
- Reply: Wathava: "Re: How to use Delete in right way"
- Reply: Pavel Lebedinsky: "Re: How to use Delete in right way"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|