Re: Can I Trust Pointer Arithmetic In Re-Allocated Memory?



On Fri, 11 Aug 2006 06:09:21 GMT, "Bill Reid"
<hormelfree@xxxxxxxxxxxxxxxx> wrote:


Barry Schwarz <schwarzb@xxxxxxxxx> wrote in message
news:k93od21vgd6n6fhrg6tooem3r5j06ejrq4@xxxxxxxxxx
On Fri, 11 Aug 2006 03:54:19 GMT, "Bill Reid"
<hormelfree@xxxxxxxxxxxxxxxx> wrote:


snip

You memory is
allocated from address to address+size-1. Furthermore, calculating
the value address+size is always allowed but you may not dereference
this address.

...you wouldn't want to dereference an address, right.

It's a very common thing to do. How else do you get the value at that
address? All subscripts involve an implied dereference.



Remove del for email
.



Relevant Pages