Article View: comp.windows.ms.programmer
Article #96Huge Pointer question
From: Mark Hjelm
Date: Tue, 28 Jul 1992 19:51
Date: Tue, 28 Jul 1992 19:51
20 lines
1284 bytes
1284 bytes
If I were to allocate two large (>64k) chunks of memory, say
using GlobalAlloc, what would be the proper way to copy the data
from one to the other? When I use GlobalLock on such things, is
the offset portion of the returned pointer guaranteed to be 0? If
so, can I just step though the chunks in 64k pieces, converting a
huge pointer to the base of each piece to a far pointer and then
using the standard _fmemcpy and friends? If so, does this technique
work under both Microsoft C and Borland C (i.e. do they implement
huge pointers the same way)? If not, what do I do? What about if
I want to copy some portion of the chunks of memory at different
offsets within the chunks? Do I need to be really careful about
64K boundaries? Just for completeness, what about plain DOS and
halloc?
Thanks,
Mark
hjelm@cs.cmu.edu
Technical Details
Message-ID:
<1992Jul28.195140.137052@cs.cmu.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!ogicse!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!hjelmShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!hjelm From: hjelm+@cs.cmu.edu (Mark Hjelm) Newsgroups: comp.windows.ms.programmer Subject: Huge Pointer question Message-ID: <1992Jul28.195140.137052@cs.cmu.edu> Date: 28 Jul 92 19:51:40 GMT Article-I.D.: cs.1992Jul28.195140.137052 Organization: School of Computer Science, Carnegie Mellon Lines: 20 Nntp-Posting-Host: g.gp.cs.cmu.edu