Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!ctrsol!emory!hubcap!ncrcae!ncrlnk!wright!sdawalt From: sdawalt@wright.EDU (Shane Dawalt) Newsgroups: comp.lang.c Subject: Re: Pointer arithmetic and comparisons. Message-ID: <876@thor.wright.EDU> Date: 9 Dec 89 20:00:40 GMT References: <257ECDFD.CDD@marob.masa.com> Organization: Wright State University, Dayton OH, 45435 Lines: 14 in article <257ECDFD.CDD@marob.masa.com>, daveh@marob.masa.com (Dave Hammond) says: > > The problem occurs when the address resulting from &buffer[len] exceeds > 65535. For example, if &buffer[0] is 65535 and len is 100, &buffer[len] > becomes 99, making `while (p < e)' immediately false. > That same problem also haunted me: Could a block be allocated such that the block was split in two by the segment boundry? I was inclined to believe not. I was correct for once. The question was asked in the Compuserve Borland forum (BPROGB). Both Borland techs and forum members assured me this cannot happen unless I attempt to access outside of the allocated block. Shane sdawalt@cs.wright.edu