🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: de.comp.lang.c++
Article #1718

Warum klappt _fmemcpy nicht für >64kB

#1718
From: Andreas Weichert
Date: Thu, 29 Feb 1996 12:18
30 lines
1011 bytes
Wie lassen sich unter Borland C++ 4.0 Speicherbereiche groesser als
64kB kopieren ?
 _fmemcpy will einfach nicht klappen. 
Es kopiert nur bis zm 3615. Element !?

Für Hilfe wäre ich dankbar.


int main(void)
{
long i;
const long Size=20000;
float huge *p1;
float huge *p2;
p1=(float* huge)farcalloc(Size,sizeof(float));
for(i=0;i<Size;i++)    p1[i]=1;
p2=(float* huge)farcalloc(Size,sizeof(float));
for(i=0;i<Size;i++)    p2[i]=2;
_fmemcpy((void* huge) p2,(void* huge) p1,Size*sizeof(float));
cout<<p2[Size-1];    // -> 1

cout<<endl;
for(i=0;i<Size;i++)
    if(p2[i]!=1) {cout<<i; break; }   // ->3616



return(0);
}
Technical Details
Message-ID: <4h45i9$apq@aix11.hrz.uni-oldenburg.de>
Path: arc1-ca.pugleaf.net!aix11.hrz.uni-oldenburg.de!news1

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!aix11.hrz.uni-oldenburg.de!news1
From: weichert@neuro.uni-oldenburg.de (Andreas Weichert)
Newsgroups: de.comp.lang.c++
Subject: Warum klappt _fmemcpy nicht für >64kB
Date: 29 Feb 1996 12:18:17 GMT
Organization: KOSY
Message-ID: <4h45i9$apq@aix11.hrz.uni-oldenburg.de>
NNTP-Posting-Host: lin2.physik.uni-oldenburg.de
X-Newsreader: WinVN 0.92.2