|
From: Hossein H. <ult...@em...> - 2003-07-15 19:10:20
|
Dear Per, > The void* parameter of delete is only guaranteed in linear addressing > mode. For 16-bit segmented code, delete might take a couple of other > parameter types, depending on memory model used. > > It might take void __near* and void __far *. > > The void __far * is for 16-bit Intel composed of a 16:16 bit pointer, > where the first 16 bit are the segment, and the next 16 bit are offset. > > However, a 16:16 pointer is still treated as a single parameter in the > code, i.e. you still write "delete myobj;", where myobj contains a pointer > returned by new. > > It is just code performing advanced pointer manipulation that needs to > know that the pointer is segmented. For memory areas < 64kB this isn't > a problem since the offset part spans 64kB. Arrays and memory blocks > larger than 64kB do require special treatment, such as conversion to void > __huge * to make sure that the offset part is always normalized 0..15 and > the segment is constantly adjusted too. You'r absolutely right! Thanks for reminding. Wishes, --Hossein -- __________________________________________________________ Sign-up for your own FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup CareerBuilder.com has over 400,000 jobs. Be smarter about your job search http://corp.mail.com/careers |